Rainier was born in England on 24 November 1741, the grandson of Daniel Regnier, a Huguenot refugee who fled France following the revocation of the Edict of Nantes, and the son of merchant Peter Rainier of Sandwich. He enlisted in the Royal Navy in 1756, at the outset of the Seven Years' War. After a period as an ordinary seaman aboard , Rainier was transferred to in 1758. He later served aboard "Norfolk", and "Burford". On 26 May 1768, working as the master of one of his family's merchant ships, Rainier was promoted to lieutenant.