1660s in sense of "arouse by knocking at the door," from knock (v.). However it is little used in this sense in American English, where the phrase means "get a woman pregnant" (1813), possibly ultimately from knock "to copulate with" (1590s; cf. slang knocking-shop "brothel," 1860).

Knocked up in the United States, amongst females, the phrase is equivalent to being enciente, so that Englishmen often unconsciously commit themselves when amongst our Yankee cousins. [John Camden Hotten, "The Slang Dictionary," London, 1860]

knock

v.

Old English cnocian (West Saxon cnucian), "to pound, beat; knock (on a door)," likely of imitative origin. Meaning "deprecate, put down" is from 1892. Related: Knocked; knocking. Knock-kneed first attested 1774. Knock-down, drag-out is from 1827. Command knock it off "stop it" is first recorded 1880, perhaps from auctioneer's term for "dispose of quickly:"

At the commencement of the sales, he gave every one that wanted to purchase a paper containing a description of the lands that were to be sold; and, as the sales were cried, he called over the numbers and described the land; and when it got up to one dollar and a quarter an acre, if no body bid, after it was cried two or three times, he would say, knock it off, knock it off. [U.S. Senate record, 1834]