He was heavily involved in the conquest of the Indonesian island of Java from Dutch and French military forces during the Napoleonic Wars and contributed to the expansion of the British Empire. He was also an amateur writer and wrote a book, The History of Java (1817).
Thomas Stamford Bingley Raffles was born in 6 July 1781 on the ship Ann off the coast of Port Morant, Jamaica, to Captain Benjamin Raffles (d. June 1797) and Anne Raffles (née Lyde). His father was a  who had a burgeoning family and 
The little money the family had went into schooling Raffles. He attended a boarding school. In 1795, at the age of 14, Raffles started working as a clerk in London for the British East India Company, the trading company that shaped many of Britain's overseas conquests.
He was appointed assistant secretary to the new Governor of Penang in 1805.
In 1804 he married Olivia Mariamne Devenish, a widow 10 years his senior.:57, 73, 107 who was formerly married to Jacob Cassivelaun Fancourt, an assistant surgeon in Madras who had died in 1800.:59, 69
At this time he also made the acquaintance of Thomas Otho Travers, who would accompany him for the next twenty years.