This paper presents a mathematical model of 255 kW grid-connected solar photovoltaic (SPV) system. To study the performance characteristics of the grid-connected SPV system, a new hybrid adaptive grasshopper optimization algorithm with the recurrent neural network (AGO-RNN) control technique was implemented. Furthermore, the power quality at the point of common coupling (PCC) has been studied using the conventional (PSO) and proposed AGO-RNN controllers. The characteristics of the PV system were analyzed under varying environmental (variable irradiance and temperature) conditions considering 3 different cases such as (i) standard test conditions (STC), (ii) variable radiation with constant temperature, and (iii) variable radiation with variable temperature. For each case, the total harmonic distortion (THD) has been calculated using the proposed AGO-RNN control technique, and the results were compared with particle swarm optimization (PSO) technique. The 255 kW PV model is initially developed and connected to a three-level NPC inverter, an MPPT-based perturbation and observation algorithm. Later, the PV model is controlled by an AGO-RNN pulse width modulation (PWM) controller and is then integrated to the main grid at PCC. The main advantage of this technique is exploiting the separate DC-DC converter between the SPV module and the inverter. Finally, the proposed grid-connected SPV system was simulated on MATLAB for analyzing the performance of the system based on its I-V and P-V characteristics, inverter voltage, grid power, gird voltage, grid current, power factor, and THD under different environmental conditions. The simulation results demonstrate that the current magnitude and THD of the SPVGC system are improved with the cutting-edge AGO-RNN controller compared to PSO in all three different scenarios, and this value is less than 1.6%, which is within the permitted limits of IEC 61727 standards.