While dining with the William FitzGerald, the Duke of Leinster at Leinster House, in response to a question regarding his future travel plans, Whaley flippantly mentioned Jerusalem. This reply led to wagers totalling £15,000 being offered that Whaley could not travel to Jerusalem and back within two years and provide proof of his success. The reasoning of those offering the bets was based on the belief that, as the region was part of the Ottoman Empire and had a reputation for widespread banditry, it would be too dangerous for travellers and it would be unlikely that Whaley could complete the journey.
Whaley embarked from Dublin on 8 October 1788, with a retinue of servants and a "large stock of Madeira wine" to cheers from the large crowd assembled at the Dublin quays. Whaley sailed first to Deal, where he was joined by a companion, a Captain Wilson, for the journey, and then on to Gibraltar where a ball was held for his arrival. In Gibraltar, his party was joined by another military officer, Captain Hugh Moore. The party set sail for the port of Smyrna, although Wilson was prevented from traveling any further by rheumatic fever. The remaining pair made an overland journey from there to Constantinople, arriving in December.
The British ambassador in Constantinople introduced Whaley to the Vizier Hasan Pasha. Taking a liking to Whaley, Hasan Pasha provided him with permits to visit Jerusalem. Whaley's party left Constantinople on January 21, 1789 by ship, and sailed to Acre.
In a meeting reported in Whaley's memoirs later, he encountered the Wāli (governor) (and de facto ruler) of Acre and Galillee, Ahmed al-Jazzar. It was Whaley's twenty-second birthday. Al-Jazzar, notoriously known as "The Butcher" in the region he ruled, look a liking to Mr Whaley; and though he dismissed the documents issued in Constantinople as worthless, he permitted Whaley to continue his journey. During this audience, Whaley said in his memoirs that he interceded with al-Jazzar to stop him breaking the back of a servant with a hammer. He also tells how al-Jazzar then paraded his concubines for the visitors.
Whaley and his companions made their way overland to Jerusalem, arriving on the 28th January. During his visit, he stayed at a Franciscan monastery, the Convent of Terra Sancta. It was a signed certificate from the superior of this institution, along with detailed observations of the buildings of Jerusalem, that would provide the proof needed to prove the success of his journey. They stayed for little over a month, before returning to Ireland overland.
Whaley arrived back in Dublin in the summer of 1789 to great celebrations and collected the winnings of the wager. The trip cost him a total of £8,000, leaving him a profit of £7,000.