Johor Lama is located near the site of the former capital of the Johor Sultanate, Kota Batu, which was established by Alauddin Riayat Shah II shortly after the fall of the Sultanate of Malacca in 1511. Kota Batu was sacked and burnt by the Acehnese in 1564, and Alauddin was taken to Aceh and killed. The capital was then moved to Bukit Seluyut for a few years.[1]
In the early 1570s, the sultan Ali Jalla returned to the Kota Batu area and reestablished the capital at Johor Lama. The Johor Sultanate had initially formed an alliance with the Portuguese against the Acehnese, however Ali Jalla confiscated the cargo of a Portuguese ship that had wrecked on the mouth of the Johor River. In response, the Portuguese stopped traders from Melaka from trading with Johor. Ali Jalla then forced ships to go Johor Lama, and attacked Melaka in January 1587. In retaliation, the Portuguese blockaded the Johor River, and later in the year led by Dom Paulo Lima de Pereira, launched an attack on Johor Lama. The fortified city was defended by 12,000 men, but the Portuguese prevailed and destroyed the fort. The capital of Johor was then moved to Batu Sawar further up the Johor River.[1]
Johor Lama was later rebuilt but again destroyed in 1604 by the Portuguese. For some time it continued to be used as a port for larger ships where goods could then be moved upstream to towns such as Batu Sawar.[2]
Concerning the destruction of Johor Lama by the Portuguese in 1587:
Borschberg, Peter, The Singapore and Melaka Straits. Violence, Security and Diplomacy in the 17th Century, NUS Press, 2010. https://www.academia.edu/4302722
Borschberg, Peter, "The value of Admiral Matelieff's writings for the history of Southeast Asia, c.1600-1620", Journal of Southeast Asian Studies, 48(3), pp. 414–435. DOI: https://doi.org/10.1017/S002246341700056X
Pinto, Paulo J. de Sousa, The Portuguese and the Straits of Melaka, 1575–1619. Power, Trade and Diplomacy, Kuala Lumpur and Singapore: MBRAS and NUS Press, 2012.