This paper proposes a control strategy for grid-following inverter control and grid-forming inverter control developed for a Solar Photovoltaic (PV)–battery-integrated microgrid network. A grid-following (GFL) inverter with real and reactive power control in a solar PV-fed system is developed; it uses a Phase Lock Loop (PLL) to track the phase angle of the voltages at the PCC and adopts a vector control strategy to adjust the active and reactive currents that are injected into the power grid. The drawback of a GFL inverter is that it lacks the capability to operate independently when the utility grid is down due to outages or disturbances. The proposed grid-forming (GFM) inverter control with a virtual synchronous machine provides inertia to the grid, generates a stable grid-like voltage and frequency and enables the integration of the grid. The proposed system incorporates a battery energy storage system (BESS) which has inherent energy storage capability and is independent of geographical areas. The GFM control includes voltage and frequency control, enhanced islanding and black start capability and the maintenance of the stability of the grid-integrated system. The proposed model is validated under varying irradiance conditions, load switching, grid outages and temporary faults with fault ride-through (FRT) capability, and fast frequency response and stability are achieved. The proposed model is validated under varying irradiance conditions, load switching, grid outages and line faults incorporating fault ride-through capability in GFM-based control. The proposed controller was simulated in a 100 MW solar PV system and 60 MW BESS using the MATLAB/Simulink 2023 tool, and the experimental setup was validated in a 1 kW grid-connected system. The percentage improvement of the system frequency and voltage with FRT-capable GFM control is 69.3% and 70%, respectively, and the percentage improvement is only 3% for system frequency and 52% for grid voltage in the case of an FRT-capable GFL controller. The simulation and experimental results prove that GFM-based inverter control achieves fast frequency response, and grid stability is also ensured.