Captain Francis Light took possession of the island from the Sultan of Kedah in 1786 and built the original fort. It was a nibong stockade with no permanent structures, covering an area of 417.6 square feet (38.80 m2). The fort's purpose was to protect Penang from pirates and Kedah. Light died in 1794.
In 1804, after the outbreak of the Napoleonic Wars, and during Colonel R.T. Farquhar’s term as Governor of Penang, Indian convict labourers rebuilt the fort using brick and stone. Fort Cornwallis was completed in 1810, at the cost of $80,000, during Norman Macalister’s term as Governor of Penang. A moat 9 metres wide by 2 metres deep once surrounded the fort but it was filled in the 1920s due to a malaria outbreak in the area.
Even though the fort was originally built for the British military, its function, historically, was more administrative than defensive. For example, the judge of the Supreme Court of Penang, Sir Edmond Stanley, was first housed at Fort Cornwallis when the court opened on 31 May 1808. During the 1920s Sikh police of the Straits Settlements occupied the fort.