Thomas Louis was born in 1758 to John and Elizabeth Louis. John was a schoolmaster in Exeter, and family legend maintained that his grandfather had been an illegitimate son of King Louis XIV, although this cannot be verified. Louis joined the Navy in 1769 aged eleven, and first went to sea aboard the sloop HMS Fly. In 1771 he moved to the larger HMS Southampton and under her captain John MacBride he subsequently moved to first HMS Orpheus and subsequently the ship of the line HMS Kent. In 1775 he gained his first experience of foreign service, joining HMS Martin on the Newfoundland Station.
In 1776, at the outbreak of the American Revolutionary War, Louis joined the frigate HMS Thetis and in her returned to Europe, there joining the ship of the line HMS Bienfaisant. In this ship he was promoted to lieutenant the following year, and in 1778 participated at the First Battle of Ushant, a British victory in the Atlantic under Augustus Keppel. In 1780, Bienfaisant was engaged at the Battle of Cape St Vincent, where the ship was badly damaged in a bitter exchange with the larger Spanish battleship Phoenix. During the storm which followed the battle, Louis took command of the captured Phoenix and saw her safely to Gibraltar. A week before, at the Action of 8 January 1780, he had performed a similar feat with another captured Spanish ship of the line, the Guipuzcoana.
After repairs, Louis commanded Phoenix on her return to Britain and was rejoined there by the Bienfaisant. In this ship, Louis was subsequently involved in the capture of the large French privateer Comte d'Artois, which mounted 60 guns. In 1781, Louis moved with his captain to the frigate HMS Artois and was then given his first independent command, the small armed vessel HMS Mackworth and escorted coastal shipping off Plymouth. In 1782 he was posted to the impress service in Sligo and Cork and in early 1783 was made post captain. During the peace, Louis lived on his half-pay in reserve near Torquay. He married Jacquetta Belfield in early 1784 and the couple had seven children. His eldest son, John Louis would later become an admiral in his own right, and his third son fought with the Royal Horse Artillery at the Battle of Waterloo.
In 1793 the French Revolutionary Wars broke out and Louis was immediately recalled to service to command HMS Cumberland in the Channel Fleet. In 1794 he moved to the new HMS Minotaur under the command of Admiral MacBride, and participated in the Atlantic campaign of May 1794, narrowly missing the Glorious First of June. In 1796 he convoyed supplies to the West Indies and then joined the Mediterranean fleet under Horatio Nelson. Two years later, Louis and Minotaur were present at the Battle of the Nile on 1 August 1798. At the battle, Minotaur fought a two-hour duel against Aquilon, ultimately forcing her surrender and there is a possibly apocryphal story that Louis was personally thanked by the seriously wounded Nelson, who is reported to have said "Farewell dear Louis, I shall never forget the obligation I am under to you for your brave and generous conduct; and now, whatever may become of me, my mind is at peace".
During 1799, Louis, under the command of Thomas Troubridge, participated in operations to disrupt the French invasion of Italy, seizing Civitavecchia and Louis personally entering Rome and raising the Union Flag over the city. In 1800, Minotaur was Lord Keith's flagship at the Siege of Genoa and the following year Louis commanded her at the invasion of Egypt. Following the Peace of Amiens, Louis briefly took command of HMS Conqueror. Less than a year later he was promoted to rear-admiral, raised his flag in the fourth rate HMS Leopard, commanded by Francis Austen, and oversaw 40 small craft seeking to disrupt French invasion preparations at Boulogne.
In 1805, Louis and Austen joined Nelson's fleet in the Mediterranean, taking over HMS Canopus. Canpous participated in the chase across the Atlantic after Villeneuve's fleet and the ensuing blockade of Cadiz. On 2 October, Nelson dispatched Canopus to Gibraltar to collect supplies for the fleet, despite strenuous objections from Louis that they would miss the forthcoming battle. Despite Nelson's assurances that they would not, on 21 October the Franco-Spanish fleet sallied out and was destroyed at the Battle of Trafalgar without Louis.
Disappointed at these events, Louis was sent under John Thomas Duckworth in late 1805 to pursue a French squadron that had reached the West Indies. The British force reached the French in February 1806 off the coast of San Domingo and in a lengthy battle drove the French flagship and another ship of the squadron ashore in flames and captured the rest. In reward of his service at this action, Louis was presented with a gold medal (his second after the Nile) and made a baronet. He returned to the Mediterranean later in the year, but had contracted an illness and spent sometime convalescing. This period was disturbed in November 1806 however when Duckworth was sent by Lord Collingwood to reconnoitre the Dardanelles.
Three months later Louis led a division of Duckworth's force in a major attempt to force passage of the channel in what later became known as the Dardanelles Operation. Although Duckworth's force reached Constantinople they were heavily battered by enemy fire and were forced to withdraw soon afterwards, Canpous suffering severely from massive stone shot fired from Turkish cannon. For his service in this operation, Louis was highly praised by Duckworth.
Louis returned with the fleet to rejoin British forces in Alexandria, Egypt, but the unidentified sickness that had plagued him in the West Indies returned and he became gravely ill. He died in May 1807 and his body was transferred to Malta for burial, being interred at Manoel Island. His death was widely mourned in the fleet, particularly among the common sailors, with whom he had always been popular.
The Royal Navy has named two ships after Louis. The first HMS Louis was a destroyer launched in 1913 which saw service during World War I before being wrecked in 1915. The second, HMS Louis (K515), was a frigate in commission from 1943 to 1946 which saw service during World War II.