This study aims to examine the use of Artificial Intelligence (AI) based on environmental context in the short story writing process by junior high school students. With the increasing use of AI technologies such as ChatGPT and similar technologies in education, there is a need to understand how AI integration can support literary creativity, particularly in addressing environmental themes. This study used a qualitative descriptive approach involving 30 eighth-grade students from two junior high schools in Makassar. Data were collected through observation of the writing process, in-depth interviews, and analysis of the resulting short story texts. The results showed that the use of environmental-based AI significantly improved the quality of narrative structure, the depth of ecological themes, and the richness of diction in students' short stories. These findings imply the need for a literature learning curriculum that integrates AI technology ethically and contextually, especially for environmental issues relevant to the lives of the younger generation. This study contributes theoretically by integrating short story writing instruction, AI literacy, and ecocritical perspectives to explain how student–AI interactions shape creativity, authorial agency, and ecological awareness. Practically, it provides a foundation for teachers to design critical AI-assisted literature learning through prompt guidelines, interaction logs, revision-process assessment, and the integration of students’ local environmental experiences.