Sultan Palace of Yogyakarta's history began when in 1558 AD, Ki Ageng Pamanahan got a land gift in the Mataram area for services that had been defeated to Aryo Penangsang. Ki Ageng Mangir's archery remained loyal to Sultan Agung to the end, building a palace in Kotagede in 1577. Substitute Ki Ageng Sutawijaya as the son of archery, in contrast to his father. Raden Sutawijaya refused to submit to the Sultan and wanted to have their territory, even dominating the whole island of Java. After winning the battle against the kingdom of Pajang in 1588, Mataram became a kingdom and Sutawijaya as Sultan with Panembahan Senopati title. Mataram kingdom had many experiences in development during the reign of the 4th Sultan generation, namely Sultan Agung Hanyokrokusumo. After Sultan Agung died his son, named Amangkurat 1 succeeded it.
Mataram kingdom suffered internal conflicts and was utilized by the VOC, and ending with the Giyanti Agreement in February 1755, the area was divided Mataram kingdom into Surakarta and Yogyakarta Sultanate. In agreement, Mangkubumi is declared Prince Sultan Yogyakarta Sultanate with his Sri Sultan Hamengku Buwana I. From 1988 until now, led by Sultan Hamengkubuwana X. The Palace was founded by Sultan Lane I a few months after the Treaty of Giyanti. The location is the former royal palace of Pesanggarahan named Garjitawati. The houses used to break the funeral procession of the Mataram king and family were buried in Imogiri Royal Cemetery.
Another version states the court location is a spring named Bannerman Pacethokan which was in the middle of the Beringan jungle. Before occupying Sultan Palace, the lane I inhabit Houses Ambar Ketawang now includes Gamping district, Sleman regency. Yogyakarta Palace is located between the Code River in the east, the west Winongo Krapyak Stage in the south, and the Tugu Monument in the north. The site is in line between the Sultan Palace, the South Sea, and Mount Merapi.