He at length acceded to the proposal of Lord Halifax, and, in June, 1762, having previously been introduced to the king, set out for Africa. He reached that country on the 20th of March, 1763; when such was his knowledge of the Arabic, that he was able to fulfill his consular duties with out the aid of an interpreter. On his way thither, he passed through the principal cities of Italy, where he made several sketches of its temples and ruins; and, it appears from his manuscripts, that he also intended writing a dissertation on the ancient and modern state of Rome. Shortly after his arrival at Algiers, a dispute occurred between him and the dey, concerning Mediterranean passes, for carrying which in a form differing from that originally prescribed, several British vessels were seized and. destroyed; of which, having first remonstrated with the dey, he immediately wrote to inform government. The ministry, however, who had been secretly prejudiced against him, by a party hostile to him at Algiers, treated his communication very lightly; and, in May, 1765, being recalled to England, he was compelled, either to abandon the principal design of his residence in Barbary, or to make his intended excursions as a private individual. After some consideration, he adopted the latter alternative; and, on the 25th of August, sailed for Tunis, stopping, on his way thither, at Utica and Carthage, the ruins of which cities he stayed some time to examine, making drawings of the most important parts, in which he was assisted by a young Bolognese artist, whom he had brought with him from Italy. In one of his incursions into the interior of the country, he discovered Cirta, the capital of Syphax, whence he returned to Tunis, and started thence for Tripoli, by way of Gabs and Gerba. On entering the desert which borders the latter town, he was attacked by the Arabs, and compelled to return to Tunis, where he remained till August, 1766, when he crossed the desert in safety, and arrived at Tripoli. He next proceeded, across the Gulf of Sydra, to Bengazi and Ptolometa, and shortly afterwards, set sail for Crete, when a shipwreck drove him again upon the African shore, with the loss of every thing but his drawings and books, which he had fortunately despatched from Tripoli to Smyrna. From Begazi, the place of his shipwreck, and where he was cruelly treated, he escaped, by a French vessel, to Canea, where he was detained by an intermittent fever, till the end of April, 1767, when he proceeded, by way of Rhodes, to Sidon.
On the 16th of September he commenced his journey to Balbec, which he reached on the 19th of the same month; and, having returned to Tripoli, set out, in a few weeks, for Palmyra. After making several drawings, which, as well as those of Balbec, he afterwards presented to the king, he traveled along the coast to Latakia, Antioch, and Aleppo, where he was attacked by a fever, from which he with great difficulty recovered. About this time, meditating the discovery of the source of the Nile, he left Aleppo for Alexandria, where he arrived on the 20th of June, 1768. From hence he proceeded by land to Rosetta, where he embarked on the Nile for Cairo. After impressing the bey of the city with an idea of his skill in medicine and prophecy, he sailed to Syene, visiting, in his way thither, the ruins of Thebes; and, on the 19th of February, 1769, set out from Kenne, through the Thebaid desert, to Cosseir, on the Red Sea; and from thence proceeded to Tor and Jidda, where he landed on the 5th of May. After making several excursions in Arabia Felix, he quitted Loheia, on the 3d of September, for Masuah; where on his arrival, he was detained for some weeks, by the treachery and avarice of the governor of that place, who attempted to murder him, in consequence of his refusal to make him an enormous present. In February, 1770, he entered Gondar, the capital of Abyssinia, the ras of which city appointed him gentleman-usher of the king's bed-chamber, commander of the household cavalry, and governor of a province.