The domain of artificial intelligence has increasingly extended into the creative arts, aiming to emulate and augment human creativity with automated processes. This is particularly evident in the field of music, where AI's ability to learn and produce intricate compositions has attracted significant attention. This study explores the challenge of generating jazz music using artificial intelligence, specifically focusing on the application of Long Short-Term Memory (LSTM) neural networks for jazz composition. By optimizing the model to address the genre's complexity, the research demonstrates the LSTM's capacity to capture and reproduce jazz's essential harmonic progressions and rhythmic nuances. Quantitative analyses show high accuracy and a deep understanding of musical structures, whereas qualitative feedback confirms the model's efficacy in producing compositions that embody jazz's spontaneity. Despite its achievements, the model's tendency to generate repetitive sequences suggests areas for improvement. This paper advances the field of AI in music, illustrating the potential of LSTM networks to mimic complex musical genres and emphasizing the necessity of ongoing model refinement to foster creativity. It highlights the evolving role of machine learning in music generation, proposing a foundation for future work aimed at diminishing the gap between AI capabilities and artistic expression.