He attended the common schools of the district and a classical school in Quakertown, Pennsylvania. He graduated from Pennsylvania College in Gettysburg, Pennsylvania, in 1865.
He studied law, was admitted to the bar in 1867 and practiced in Allentown. He was elected district attorney in 1874. He served as adjutant of the Fourth Regiment, Pennsylvania National Guard, during the riots at Reading, Pennsylvania, in 1877.
Erdman was elected as a Democrat to the Fifty-third and Fifty-fourth Congresses.
He was not a candidate for reelection in 1896. He resumed the practice of law in Allentown.
He served as a trustee of Muhlenberg College at Allentown. He was president of the Coplay Cement Manufacturing Company, the Allentown & Coopersburg Turnpike Company, and the Allen Fire Insurance Company for many years.
He died in Allentown in 1911 and was interred in Fairview Cemetery.