 Maxwell stood in the 1818 general election, seeking to become Member of Parliament for Westminster. He was narrowly defeated by less than 400 votes, losing to Sir Samuel Romilly and Sir Francis Burdett. The campaign ruined him financially, and after a "severe personal injury" in Covent Garden when he was struck in the back by a paving stone thrown from a mob opposed to his candidacy, he was left with disgust for the political process. Maxwell's lungs were badly damaged; he never fully recovered from the injury, and never again became involved in politics, instead returning to the Navy in 1821 as captain of HMS Bulwark, the flagship of Admiral Sir Benjamin Hallowell at Chatham. The same year, the Arctic explorer Henry Parkyns Hoppner, who had served under Maxwell aboard the Alceste on the mission to China, named Murray Maxwell Bay on Baffin Island after his former captain.
