Reilly was elected as a Democrat to the Forty-fourth and Forty-fifth Congresses. He resumed the practice of law in Pottsville. He was a delegate to the 1880 Democratic National Convention. He was an unsuccessful candidate for law judge of Schuylkill County in 1881 and again in 1882, and an unsuccessful Democratic candidate for election in 1884 to the Forty-ninth Congress.