After sailing in the sloop Tartar to Havana, Cuba, and from there in the French letter of marque Gustave to France, in June 1779 Mayrant became a Midshipman in the Continental Navy and aid to John Paul Jones, who commanded the Continental Ship Bonhomme Richard. On 23 September 1779, during that ship’s intense battle with HMS Serapis, he was wounded while leading a boarding party.
Soon promoted to the rank of Lieutenant in South Carolina’s Navy, Mayrant subsequently served in the frigate South Carolina and ashore at Charleston.
With the coming of peace in 1783, Lieutenant Mayrant was discharged from service and thereafter pursued private affairs and civic responsibilities in his home state. Late in life he moved to Alabama and then to Tennessee, where he died in August 1836.