Modern-day Kota Kinabalu can trace its history back to 1882, when the British North Borneo Chartered Company established an outpost on nearby Pulau Gaya. At that time, Sandakan was the capital of Sabah.
However, the settlement on the island of Gaya did not last as Mat Salleh, an indigenous Bajau freedom fighter burned and destroyed that Gaya settlement. British North Borneo Company decided to build a new settlement at a more secure place just across Gaya Island on the mainland where today’s Kota Kinabalu City located. The place was grown with a type of mangrove trees known as Api Api. After clearing the areas, the British North Borneo Company start building houses and offices for the company. The area was later expanded and renamed Jesselton. The name Jesselton is chosen from the name of Sir Charles Jessel, The then Vice Chairman of the British North Borneo Company.
Jesselton was razed during World War 2 by British North Borneo Company to prevent it from falling into the name of the invading Japanese Forces. Japanese successfully have taken over the town and rename it Api. The name Api(亚庇) are still commonly called by the community in Sabah until today. Few rebellion and uprising against the Japanese forces by the people of Jesselton and the most notable one is Albert Kwok.
After the Japanese surrender, British North Borneo Company returned and find the town was totally destroyed leaving only three buildings. The company surrendered North Borneo to the British Government in 1946. The new colonial government decided to rebuild Jesselton instead of Sandakan as the capital of North Borneo.
In 1963, North Borneo together with Sarawak, Singapore and Malaya formed the Federation of Malaysia. North Borneo became known as Sabah and Jesselton remained its capital. It was on September 30, 1968, that Jesselton became Kota Kinabalu. In February 2000, Kota Kinabalu received official city status from the Malaysian government.