In aerobraking, the orbital energy is reduced by the atmosphere of the planet instead of large propulsive maneuvers resulting in propellant mass savings, which in turn lower launch costs, make extra mass available for the payload, or extend mission lifetime by conserving propellant. However, aerobraking campaigns require 3-9 months to complete and are operationally intensive. Aerobraking has been performed seven times in history; in all of them, the solar panels were oriented perpendicular to the flow direction prior to each atmospheric pass and to the Sun after the pass. This study examines aerobraking in which the solar arrays are exploited to provide in-plane control to the spacecraft during the atmospheric pass. This concept has the advantage of being able to compensate for density variations during the atmospheric pass. This ability can be used to maintain the probe in a safe thermal environment while maximizing energy depletion per atmospheric pass. Over an aerobraking campaign, this will have the effect of not only minimizing the number of apoapsis propulsive maneuvers required to maintain a safe periapsis altitude, but also will reduce the time required to complete the aerobraking campaign. On the basis of an analytical solution obtained through Pontryagin’s minimum principle, an online optimal control algorithm has been implemented, which is able to control the atmospheric pass by rotating the solar panels. The optimal controller has been built to assure that the solar panels never exceed the thermal constraints and to exploit real-time data to maximize the dissipated energy during an atmospheric pass. Performance analyses of the controller indicate that its use enables a decrease of over 70% to the aerobraking duration if the only heat rate is fixed and a decrease of over 50% if also the heat load is constrained. Moreover, results show that this strategy enables to set and achieve a defined final spacecraft state.