In high-precision celestial navigation, star map recognition algorithms are crucial. We identified limitations in the classical grid star map recognition algorithm (CGSMRA) concerning star sorting method, selection strategy, scoring criterion, and screening mechanisms. To address these, we developed a multidimensional optimization-improved grid star map recognition algorithm (MOIGSMRA). We evaluated MOIGSMRA through five experiments: template matching efficiency, companion star recognition, recognition accuracy, attitude determination accuracy, and overall performance. Compared to CGSMRA, MOIGSMRA demonstrated superior results. This study offers a method to optimize attitude determination algorithms for star sensors and provides a theoretical and experimental foundation for improving star recognition accuracy.