The linear measurement of 12 inches was in Old English, from the length of a man's foot. Colloquial exclamation my foot! expressing "contemptuous contradiction" [OED] is first attested 1923, probably a euphemism for my ass, in the same sense, which dates back to 1796. The metrical foot (Old English, translating Latin pes, Greek pous in the same sense) is commonly taken as a reference to keeping time by tapping the foot.

To get off on the right foot is from 1905; to put one's best foot foremost first recorded 1849 (Shakespeare has the better foot before, 1596). To put one's foot in (one's) mouth "say something stupid" is attested by 1942; the expression put (one's) foot in something "make a mess of it" is from 1823.