Born at Little Falls, New York, Petrie attended the common schools, worked as a store clerk, and became a merchant, operating a store in partnership with his brother Richard.
He was active in the militia, serving as quartermaster of his regiment during the War of 1812.
He later attained the rank of major general as commander of the New York Militia's 1st Division of Riflemen.
Petrie was elected as an Independent Democrat to the Thirtieth Congress (March 4, 1847 – March 3, 1849) He was employed as a clerk in the Post Office Department in Washington, D.C., from January 1, 1869, until August 31, 1875, when he resigned.
This article incorporates public domain material from the Biographical Directory of the United States Congress