Abdi Dalem is the King's Assistant at the Ngayogyakarta Hadiningrat Palace, Indonesia, which has a special variety of written language. This research aims to formulate the variety of Abdi Dalem written language in the kedhaton (inner core) environment of Ngayogyakarta Hadiningrat Palace as well as grammatical analysis to improve the quality of the variety of written language. This research is descriptive qualitative research. The form of this research data is a variety of Abdi Dalem written language in the kedhaton (inner core) environment of the palace in the form of regulations, bulletins, official letters and Abdi Dalem training books. The data were collected by identifying the places and samples, reviewing related literature, reviewing various written languages, and doing an interview. Data analysis techniques are describing Abdi Dalem, linguistic analysis of Abdi Dalem's written language, and data interpretation. The results of the research show that the variety of Abdi Dalem's official written language consists of 1) the Bagongan variety of Javanese, 2) Indonesian. The grammatical inaccuracy of Abdi Dalem's variety of written language consists of 1) Bagongan lexicon inaccuracy, 2) New Javanese vocabulary inaccuracy, 3) inaccuracy in the use of the New Javanese Ngoko (N) affix, 4) spelling inaccuracy. With this grammatical analysis, it is hoped that it can improve the quality of Abdi Dalem Ngayogyakarta Hadiningrat Palace's variety of written language.