After the dissolution of Parliament in 1621, Pym was arrested, and brought before the Privy Council, but released in August 1622. In 1624, he was elected for Tavistock, a seat controlled by Earl of Bedford, which he retained for the rest of his career. He was one of the prime movers behind an attempt to impeach the Duke of Buckingham in 1626, an action that led to Parliament being dissolved. Only Buckingham's assassination in August 1628 prevented a second attempt, while Pym supported the presentation of the Petition of Right to Charles I in 1628.