At the Restoration, Whalley, with his son-in-law, Major-General William Goffe, escaped to North America, and landed at Boston on 27 July 1660, where they were well received by Governor John Endecott and visited by the principal persons of the town. They went about quite openly, and chose to live in Cambridge, about 2 miles (3.2 km) from Boston. During this period the English Parliament was debating the content of the Indemnity and Oblivion Act and intelligence that reached the colony that all but seven of the regicides would be pardoned. Knowledge of final contents of the act did not reach the colony until November 1660, and for several months opinion among the leaders of the colony on what to do with Whalley and Goffe was divided.

By February 1661, the Governor seems to have had second thoughts about welcoming the regicides so warmly and on the 22nd summoned a court of assistants to discuss their arrest, but the court did not agree to such action. Whalley and Goffe decided they were no longer safe in Cambridge and left on 26 February. Within a few days (on 8 March ), orders arrived, via Barbados, from England for their arrest.

The two moved to New Haven, Connecticut, where John Dixwell, also condemned as a regicide, was living under the assumed name of James Davids. Arriving on 7 March 1661, they lodged with John Davenport, the local minister. News of the orders for their arrest arrived in New Haven, so Whalley and Goffe used a subterfuge to throw off any pursuit. They made a show of leaving and going to Milford, where they made sure they were seen, but that night they returned in secret to New Haven. They again lodged secretly with Davenport and a number of other sympathisers until 13 May, when they resorted to hiding in some woodland and a cave on Providence-Hill (spending some nights in a nearby house). Providence-Hill is now known as West Rock, and today the cave is called Judges Cave. In August they moved into a house in Milford belonging to Mr. Tomkins, another sympathiser, and remained there for two years. In 1664 they were forced to return to the cave when the King's commissioners arrived in Boston, but Indians discovered the cave while the two were absent, which forced them to move further away from Boston. On 13 October, travelling only by night, they set off for Hadley, about one hundred miles away in Massachusetts, where the minister, John Russell, had arranged for them to live with him. They remained there undiscovered for fifteen or sixteen years, receiving money from their wives in England and presents from a few supporters who knew where they were in order to pay their host. In the first few years they were in constant fear of discovery, and were much relieved to read in the newspapers that they were thought to have died in Switzerland while living in exile with other regicides. Every attempt by the English government to procure Whalley or Goffe's arrest failed. Whalley was alive but in poor health in 1674, and probably did not live long afterwards.