This paper presents the design and analysis of a campus microgrid system using MATLAB. The microgrid is designed to integrate renewable energy sources, storage systems, and conventional generators to meet the electricity demand of a campus. The system includes solar photovoltaic panels, wind turbines, and battery storage, along with diesel generators for backup power. The design process involves optimizing the size and placement of each component to minimize cost and maximize efficiency. MATLAB simulations are used to analyze the performance of the microgrid under various operating conditions, including grid-connected and islanded modes. The results demonstrate the feasibility and effectiveness of the proposed microgrid system in providing reliable and sustainable power for campus facilities.