In a landscape dominated by the digitalization of energy networks, safeguarding cyber-physical microgrids and against breaches anomalies emerges as a critical imperative. This study pioneers inventive methodologies for Intelligent Detection of Intrusions and Anomalies in Inverter-centric Cyber-Physical Microgrids, leveraging state-of-the-art machine learning paradigms. Using the combined power of LSTM and Convolutional Neural Networks, our suggested approach finds breaches and aberrations in microgrid structures with remarkable accuracy and efficiency. Additionally, we integrate the effectiveness of Gradient Boosting Machines to enhance the overall detection capabilities. Experimental findings underscore the efficacy of our machine learning-driven approach, with CNN achieving a precision of 95%, recall of 92%, and F1-score of 93% in intrusion detection, while LSTM attains a precision of 93%, recall of 91%, and F1-score of 92% in anomaly identification. Furthermore, GBM contributes to achieving an overall efficiency of 96%. Our approach not only bolsters microgrid resilience but also lays the foundation for a secure energy future. In an increasingly interconnected world, the integration of these sophisticated techniques not only bolsters microgrid resilience but also lays the foundation for a secure energy future. By embracing innovation at the convergence of machine learning and energy systems, we stride toward fortified and dependable cyber-physical microgrids.