Career
He was elected to serve as Member of Parliament for Middlesex from 1784 to 1800. In the 1802 General election, he stood as candidate for Middlesex again was opposed by the radical Francis Burdett. Mainwaring had previously resisted Burdett"s calls for an inquiry into prison abuses, particularly at Coldbath Fields Prison.
Mainwaring was defeated by Burdett but the election was declared void in 1804 and in the following contest William"s son George Boulton Mainwaring was elected.
The result was reversed in favour of Burdett in 1805 and the back in favour of Mainwaring Junior in 1806. Mainwaring did not contest the 1807 election and Burdett was not elected.