Born in Fairfield, New York, Marvin moved with his parents to Dryden, New York, in 1809. He attended the public schools. He studied law. He was admitted to the bar in 1829 and commenced practice in Jamestown, New York. He served as member of the State assembly in 1836 and 1837.
Marvin was elected as a Whig to the Twenty-fifth and Twenty-sixth Congresses (March 4, 1837-March 3, 1841). He served as chairman of the Committee on Expenditures in the Post Office Department (Twenty-sixth Congress). He was not a candidate for renomination in 1840. He served as delegate to the State constitutional convention in 1846. He served as judge of the eighth judicial district 1847-1871. He resumed the practice of law in Jamestown, New York, and died there January 11, 1892. He was interred in Lakeview Cemetery.