David Ritchie (August 19, 1812 – January 24, 1867) was a Whig, Opposition Party and Republican member of the U.S. House of Representatives from Pennsylvania.
David Ritchie born in Canonsburg, Pennsylvania. He graduated from Jefferson College in Canonsburg in 1829, and subsequently at Heidelberg, Germany. He studied law, was admitted to the bar in 1835 and commenced practice in Pittsburgh, Pennsylvania.
Ritchie was elected as a Whig to the Thirty-third Congress, reelected as an Opposition Party candidate to the Thirty-fourth Congress, and elected as a Republican to the Thirty-fifth Congress. He served as chairman of the United States House Committee on Revolutionary Claims during the Thirty-fourth Congress. He was appointed associate judge of the court of common pleas of Allegheny County, Pennsylvania, in 1862 and served nine months. He resumed the practice of law and died in Pittsburgh in 1867.