 Wharton was a member of the Philadelphia city council from 1792 till 1795.In 1796 he was made alderman of that city, and in the same year quelled a riot among sailors who had organized themselves into a body and demanded higher wages.After reading the riot act, he requested they disperse, and, being received with shouts of defiance, Wharton ordered each of his men "to take his man," and the sailors were captured and imprisoned.