Whitney was active in organizing the Young Men's Democratic Club in 1871.
He was an aggressive opponent of the Tweed Ring, and was actively allied with the anti-Tammany 
County Democracy of 1871–1890.

In 1872, he was made inspector of schools, but the same year met defeat in the election for district attorney.

From 1875 to 1882 he was corporation counsel of New York City, and as such brought about a codification of the laws relating to the city, and successfully contested a large part of certain claims, largely fraudulent, against the city, amounting to about $20 million, and a heritage from the Boss Tweed regime.

In 1882, he resigned to attend to personal interests.

In 1883, through the Broadway Railroad Company, Whitney became involved in a struggle with Jacob Sharp and Thomas Fortune Ryan for the Broadway street-railway franchise.
Sharp initially won the franchise by means of bribery, but in December 1884 Ryan formed an alliance with Whitney and Peter A.B. Widener.
By arousing public opinion, instituting court action, and prompting legislative investigation, they defeated Sharp.
The Ryan syndicate finally received the franchise in 1886.

During President Cleveland's first administration (1885–1889), Whitney was United States Secretary of the Navy, and did much to develop the United States Navy.
The contracts issued under the previous administration were investigated impartially by a committee appointed by Whitney and comprising Commander Evans, Commodore Belknap and Herman Winter, chief engineer of the Metropolitan Steamship Company.
Whitney promoted the adoption by industry of the technology needed for the construction of steel steamships and modern naval guns and the domestic manufacture of plate armor.
He also reorganized the finances and logistics of the Navy Department and helped make the Naval War College a success.

When Whitney left office in 1889, steel vessels completed or under construction included the armored cruiser (later battleship) Maine; monitors Puritan, Amphitrite, Monadnock, Terror and Miantonomoh; protected cruisers Atlanta, Boston, Chicago, Newark, Charleston, Baltimore, Philadelphia, and San Francisco; dynamite-gun cruiser Vesuvius; dispatch vessel Dolphin; gunboats Yorktown, Concord, Bennington and Petrel; and torpedo boat Cushing.
These constituted the nucleus of the "New Navy"  During Whitney's four years in the cabinet, his home in Washington, D.C., was a social center of great attraction.
In 1888, Yale conferred upon him the honorary degree of LL.D.
Whitney joined Charles T. Barney, Henry F. Dimock, W.E.D. Stokes, Francis W. Jenks, and others in forming the New York Loan and Improvement Company in 1890.

This concern developed the Washington Heights section of New York City.

Barney was president of the company when he died in 1907, three years after Whitney.
 In opposition to Tammany, Whitney was instrumental in bringing about the third nomination of Cleveland in 1892, and took an influential part in the ensuing presidential campaign.

Whitney joined his brother Henry in organizing the Dominion Coal Company Ltd. in 1893, and the Dominion Iron and Steel Company Ltd. in 1899, to exploit the mineral resources of the Sydney district of Cape Breton Island.
Other early investors included Henry F. Dimock, Almeric H. Paget and Charles T. Barney.
 In the next general election, in 1896, disapproving of the "free-silver" agitation, Whitney refused to support his party's candidate, William Jennings Bryan.
Whitney was active in organizing the Young Men's Democratic Club in 1871. He was an aggressive opponent of the Tweed Ring, and was actively allied with the anti-Tammany 
County Democracy of 1871–1890.
In 1872, he was made inspector of schools, but the same year met defeat in the election for district attorney.
From 1875 to 1882 he was corporation counsel of New York City, and as such brought about a codification of the laws relating to the city, and successfully contested a large part of certain claims, largely fraudulent, against the city, amounting to about $20 million, and a heritage from the Boss Tweed regime.
In 1882, he resigned to attend to personal interests.
In 1883, through the Broadway Railroad Company, Whitney became involved in a struggle with Jacob Sharp and Thomas Fortune Ryan for the Broadway street-railway franchise. Sharp initially won the franchise by means of bribery, but in December 1884 Ryan formed an alliance with Whitney and Peter A.B. Widener. By arousing public opinion, instituting court action, and prompting legislative investigation, they defeated Sharp. The Ryan syndicate finally received the franchise in 1886.
During President Cleveland's first administration (1885–1889), Whitney was United States Secretary of the Navy, and did much to develop the United States Navy. The contracts issued under the previous administration were investigated impartially by a committee appointed by Whitney and comprising Commander Evans, Commodore Belknap and Herman Winter, chief engineer of the Metropolitan Steamship Company. Whitney promoted the adoption by industry of the technology needed for the construction of steel steamships and modern naval guns and the domestic manufacture of plate armor. He also reorganized the finances and logistics of the Navy Department and helped make the Naval War College a success.
When Whitney left office in 1889, steel vessels completed or under construction included the armored cruiser (later battleship) Maine; monitors Puritan, Amphitrite, Monadnock, Terror and Miantonomoh; protected cruisers Atlanta, Boston, Chicago, Newark, Charleston, Baltimore, Philadelphia, and San Francisco; dynamite-gun cruiser Vesuvius; dispatch vessel Dolphin; gunboats Yorktown, Concord, Bennington and Petrel; and torpedo boat Cushing. These constituted the nucleus of the "New Navy"  During Whitney's four years in the cabinet, his home in Washington, D.C., was a social center of great attraction. In 1888, Yale conferred upon him the honorary degree of LL.D.
Whitney joined Charles T. Barney, Henry F. Dimock, W.E.D. Stokes, Francis W. Jenks, and others in forming the New York Loan and Improvement Company in 1890. 
This concern developed the Washington Heights section of New York City. 
Barney was president of the company when he died in 1907, three years after Whitney.  In opposition to Tammany, Whitney was instrumental in bringing about the third nomination of Cleveland in 1892, and took an influential part in the ensuing presidential campaign.
Whitney joined his brother Henry in organizing the Dominion Coal Company Ltd. in 1893, and the Dominion Iron and Steel Company Ltd. in 1899, to exploit the mineral resources of the Sydney district of Cape Breton Island. Other early investors included Henry F. Dimock, Almeric H. Paget and Charles T. Barney.  In the next general election, in 1896, disapproving of the "free-silver" agitation, Whitney refused to support his party's candidate, William Jennings Bryan.
William Collins Whitney