Cooper was a member of the commonwealth council of state during the time of Oliver Cromwell.
During the English Civil War he was originally a supporter of the crown but switched sides and joined the parliamentarians in 1644 due to his concerns about Charles I. He supported the restoration of Charles II. After the fall of Lord Clarendon in 1667, Cooper, now raised to the peerage as Lord Ashley, became a prominent member of the Cabal, in which he formed the second "A". Ashley became Lord Chancellor in 1672, and was raised to become Earl of Shaftesbury.
Due to his intriguing with the Duke of Monmouth against the succession of the Catholic Duke of York, Shaftesbury fell from favor, and became a leader of the radical Whigs. In 1681, Shaftesbury was charged with high treason, but the charges were later dismissed.