Dingley was elected as a Republican to the 47th Congress to fill the vacancy caused by the resignation of William P. Frye. He was then reelected to the 48th and to the seven succeeding Congresses, serving from September 12, 1881, until his death in Washington, D.C., before the close of the 55th Congress. Reputedly "destitute of humor but soundly versed in finance", Dingley was chairman of the U.S. House Committee on Ways and Means in the 54th and 55th Congresses. The tariff schedule of 1897, known as the Dingley Tariff, was framed under his direction to repeal and reverse the lower rates set forth in the 1894 DemocraticWilson–Gorman Tariff Act. The Dingley Tariff raised tariff rates and granted the President authority to invoke reciprocity when negotiating trade treaties.
Dingley had been reelected to the 56th Congress and was succeeded by Charles E. Littlefield upon his death in Washington, D.C., on January 13, 1899. He is interred in Oak Hill Cemetery, near Auburn, Maine.