Thomas Cochrane was born at Annsfield, near Hamilton, South Lanarkshire, Scotland, the son of Archibald Cochrane, 9th Earl of Dundonald and Anna Gilchrist. She was daughter of Captain James Gilchrist RN and Ann Roberton, (daughter of Major John Roberton 16th Laird of Earnock).
Cochrane had six brothers, one was Major William Erskine Cochrane of the 15th Dragoon Guards who served with distinction under Sir John Moore in the Spanish wars of 1808-11 and Captain Archibald Cochrane RN.
Cochrane perpetuated lines of Scottish aristocracy and military service from both sides of his family.
Through his uncle, Admiral Sir Alexander Forrester Inglis Cochrane the sixth son of the 8th Earl of Dundonald, Cochrane was cousin to his namesake Sir Thomas John Cochrane, Vice Admiral of the United Kingdom and Governor of Newfoundland.
The family fortune had been spent, and in 1793, the family estate was sold to cover debts.
During his service on this ship, he was tried by a court martial for apparently showing disrespect to Philip Beaver, the ship's first lieutenant. Though found innocent of the serious charge he was reprimanded for being flippant. This began a pattern of Cochrane being unable to get along with many of his superiors, subordinates, employers and colleagues in several navies and Parliament; even those with whom he had much in common, and who should have been natural allies. It led to a long enmity with John Jervis, 1st Earl of St Vincent.
In 1799, Cochrane briefly commanded the prize crew taking the captured French battleship Genereux to the British base at Mahon. The ship was almost lost in a storm, with Cochrane and his brother personally going aloft in place of a crew that were mostly ill.
In 1800, Cochrane was appointed to command the brig sloop HMS Speedy. Later that year, he was almost captured by a Spanish warship concealed as a merchant ship. He escaped by flying a Danish flag and dissuading an attempt to investigate by claiming his ship was plague-ridden.
Chased by an enemy frigate, and knowing it would follow him in the night by the glimmer of light from the Speedy, he placed a candle on a barrel and let it float away. The enemy frigate followed the candle and Speedy escaped.
In February 1801 at Malta he got into an argument at a fancy dress ball with a French Royalist officer (Cochrane came dressed as a common sailor, and was mistaken for one) which led to Cochrane's only duel. The French officer was wounded by Cochrane's pistol but Cochrane was unharmed.
One of his most famous exploits was the capture of the Spanish frigate El Gamo, on 6 May 1801. El Gamo carried 32 guns and 319 men, compared with the 14 guns and 54 men on Speedy. Cochrane flew an American flag to approach so closely to Gamo that its guns could not depress to fire on the Speedy's hull. This left only the option of boarding, but whenever the Spanish were about to board, Cochrane would pull away briefly, and fire on the concentrated boarding parties with his ship's guns. Cochrane then boarded the Gamo, despite still being outnumbered about five to one, and captured her.
In the 15 month cruise of the Speedy Cochrane captured, burned, or drove ashore more than 50 ships before being captured on 3 July 1801 by three French ships of the line under Admiral Linois.
On 8 August 1801 he was promoted to the rank of post-captain.
During the Peace of Amiens, Cochrane attended the University of Edinburgh.
Upon the resumption of war in 1803, St Vincent assigned him to command of a captured sixth-rate French privateer, HMS Arab (formerly Le Brave). This ship had poor handling, collided with Royal Navy ships on two occasions (the Bloodhound and the Abundance), and afforded Cochrane no opportunities. He would notably compare the Arab to a collier in his autobiography. Despite this, he still managed to intercept and board an American merchant ship, the Chatham, and create an international incident, leading to the consignment of HMS Arab and her commander to fishing fleet protection duties beyond Orkney in the North Sea.
In 1804, the new government of William Pitt the Younger removed St Vincent and Cochrane was appointed to command of the 32-gun frigate HMS Pallas.
In 1807, he was given command of the 38-gun frigate Imperieuse. One of his midshipmen was Frederick Marryat who later wrote fictionalized accounts of his adventures with Cochrane.
Cochrane used this ship to raid the Mediterranean coast of France. In 1808, Cochrane and a Spanish guerrilla force captured the fortress of Mongat, which sat astride the road between Gerona and Barcelona. As a result, a French army under General Duhesme was delayed for a month. Another raid copied code books from a signal station, leaving behind the originals so the French would believe them uncompromised. When Imperieuse ran short of water, she sailed up the estuary of the Rhone to replenish. When a French army marched into Catalonia and besieged Rosas, Cochrane took part in the defence of the town by occupying and defending Fort Trinidad (Castell de la Trinitat) for a number of weeks.
While captain of Speedy, Pallas, and Imperieuse Cochrane became arguably the most effective practitioner of coastal warfare during the period. Not only did he attack shore installations but captured enemy ships in harbor by leading his men in boats in "cutting out" operations. He was a meticulous planner of every operation, limiting casualties among his men and maximizing success.
In 1809, he was chosen to command the attack of a flotilla of explosion and fire ships on Rochefort, as part of the Battle of the Basque Roads. Some damage was done, but Cochrane felt that a great opportunity was lost, for which he blamed the fleet commander, Admiral Gambier. As a result of the public expression of this opinion, he spent some time without a naval command.
In May 1807, Cochrane was elected by Westminster in a more democratic election. He would hold this seat until 1818. (He was expelled in 1814, but re-elected at the resulting by-election). 
Cochrane campaigned for parliamentary reform, allied with such Radicals as William Cobbett and Henry Hunt. His outspoken criticism of the conduct of the war and the corruption in the navy made him powerful enemies in the government, and his criticism of Admiral Gambier's conduct at the Battle of the Basque Roads (so severe that Gambier demanded a court-martial to clear his name) made him enemies in the Admiralty.
In 1810, Sir Francis Burdett, a Member of Parliament and political ally, had barricaded himself into his home at Piccadilly, London, resisting arrest by the House of Commons. Cochrane went to assist Burdett's defence of the house. His approach to this, however, was essentially similar to the approach he had taken in defending forts against enemy attack and would have led to numerous deaths amongst the arresting officers and at least partial destruction of Burdett's house, along with much of Piccadilly. On realising what Cochrane planned, Burdett and his allies took steps to end the siege.
Cochrane was popular, but unable to get along with his colleagues in the House of Commons, let alone the government. He rarely achieved a great deal for his causes. An exception was his 1812 confrontation of the Admiralty's prize court.
Cochrane made his last speech in Parliament (in favour of parliamentary reform) in 1818. In 1830, he was invited to stand for Parliament by the reform-minded government of Lord Brougham. After initially expressing interest, Cochrane declined, partly because Lord Brougham's brother decided to run for the seat, and partly because he thought it would look bad to be publicly supporting a government from which he sought pardon of a fraud conviction (see The Great Stock Exchange Fraud below).
In 1831, his father died and Cochrane became the 10th Earl Dundonald. As such, he was eligible to sit in the House of Lords, but not in the House of Commons.
Cochrane and Katherine would remarry in the Anglican Church in 1818, and in the Church of Scotland in 1825. They had five children ;
The confusion of multiple ceremonies led to suspicions that Cochrane's first son, Thomas Barnes Cochrane, 11th Earl of Dundonald, was illegitimate, and delayed his accession to the Earldom of Dundonald on his father's death.
Katherine, called Kate, Kitty, or "Mouse" in letters to her by Cochrane, often accompanied her husband on his campaigns in South America.
He was sentenced to the pillory (a more severe form of the stocks) and a year's imprisonment. He was excused from doing pillory for fear that his supporters might riot. He was also expelled from Parliament and the navy. As an additional humiliation he was stripped of his knighthood and a degradation ceremony performed. He was, however, immediately re-elected for Westminster. There was considerable public anger at his trial and sentence, especially the degrading pillory.
For the rest of his life, Cochrane would campaign to have his conviction reversed and his honours restored. He would receive a royal pardon in 1832, and be restored to the navy list and gazetted rear admiral. Not until 1847, however, would his knighthood be restored, by the personal intervention of Queen Victoria. And only in 1860 would his banner return to Westminster Abbey, just in time for his funeral.
Cochrane left the UK in official disgrace in 1818. At the request of Chilean leader Bernardo O'Higgins, he took command of the Chilean Navy in Chile's war of independence against Spain.
Accompanied by Lady Cochrane and his two children, he reached Valparaiso on 28 November 1818. Cochrane was named vice-admiral and reorganized the Chilean navy. He took command of the frigate O'Higgins and raided the coasts of Chile and Peru as he had France and Spain. He introduced British naval customs into the Chilean navy. He organized and succesfully led the capture of Valdivia despite only having 300 men and 2 ships against over 7 large forts. Validivia was the largest city in South America and also was Spain's most important base in Chile. In 1820, forces under his command cut out and captured the Esmeralda, the most powerful Spanish ship in South America. He failed to capture Chiloé Archipelago for Chile. Later, he was ordered by O'Higgins to lead the Chilean fleet to free Peru from Spain, while Jose de San Martin would lead the Freedom Army. This resulted in Peruvian independence, which O'Higgins considered indispensable to Chile's independence and security.
Cochrane is alleged to have made plans to free Napoleon from his exile on Saint Helena and make him ruler of a unified South American state. Before he could carry out his plan, Napoleon died in 1821.
The Chilean Navy has named five ships Cochrane or Almirante Cochrane (Admiral Cochrane) in his honour:
Cochrane took command of the Brazilian navy and its flagship the Pedro Primeiro. By bluff, he convinced the Portuguese army in Bahia to evacuate to Maranhão (Maranham), captured much of the escaping convoy, then sailed ahead of the convoy to Maranhão and bluffed Maranhão into surrendering as well. Finally, he sent a subordinate Captain Grenfell to Pará, who used the same bluff to extract Para's surrender.
As a result of rebellions and attempted palace coups, Cochrane found himself Governor of the province of Maranhão. Dissatisfied with his situation, Cochrane boarded a frigate and sailed it to England.
During his government, Emperor Pedro I of Brazil created him Marquess of Maranham (Marquês do Maranhão).
In his final years he wrote his autobiography in collaboration with G.B. Earp. With his health deteriorating, in 1860 Lord Thomas Cochrane twice underwent painful surgery for kidney stones. He died during the second operation on 31 October 1860, in Kensington. He was buried in Westminster Abbey. His grave is in the central part of the nave.
In 1806, Cochrane had a galley made to his specifications, which he carried on board Pallas and used to attack the French coast.
In 1812, Cochrane proposed attacking the French coast using a combination of bombardment ships, explosion ships and "stink vessels" (gas warfare). A bombardment ship consisted of a strengthened old hulk filled with powder and shot and made to list one side which was then anchored at night to face the enemy behind the harbor wall. This allowed saturation bombardment of the harbor closely followed by landings of troops. He put the plans forward again before and during the Crimean War. The authorities decided not to pursue his plans, partly because they would cause terrible destruction and might later be used against Britain. The plans would be kept secret until 1895.
In 1818, Cochrane patented, together with the engineer Marc Isambard Brunel, the tunneling shield, which Brunel and his son later used in the building of the Thames Tunnel in 1825-43.
Cochrane was an early advocate of steamships. He attempted to bring a steamship from England to Chile, but its construction took too long and it arrived as the war was ending. The same thing happened to steamships he had hoped to bring to the Greek War of Independence. In the 1830s, he experimented with steam power, developing a rotary engine and a propeller. In 1851, Cochrane received a patent on powering steamships with bitumen.
The novel The Sea Lord (originally The Frigate Captain) by Showell Styles is explicitly about Lord Cochrane.
In the alternate history series The Domination by S.M. Stirling, Lord Cochrane leads the occupation of Cape Colony.
The novel Sharpe's Devil by Bernard Cornwell features an episode from Cochrane's time in Chile.
Lord Cochrane is a minor character in "Manuela" (ISBN 0-9704250-0-7) by Gregory Kauffman, a novel about the South American revolution.