1660s, "arouse by knocking at the door," from knock (v.) + up (adv.). However it is little used in this sense in American English, where the phrase means "get a woman pregnant" (1813), possibly ultimately from knock in a sense "to copulate with" (1590s; compare 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]