Prosecutor Simon Jones said that between 7:45 and 8:52 BST police received a number of calls about dangerous driving on the two motorways.
When police arrived on the scene of the collision Sterling was in the passenger seat of the car with two nitrous oxide canisters on his lap, the court was told.
Witnesses described seeing a Lamborghini driver inhaling from a white balloon.
Fiona Jennings, who saw the vehicle on the M3 at 8:45, said she looked across and thought that an airbag had inflated, but then realised it was an inflated balloon.
She told police she saw “absolutely horrendous driving” as the Lamborghini swerved in and out of lanes.
Sterling complied with a road side breath test, which was negative, and a preliminary drug test, which indicated no cannabis or cocaine.
However, tests carried out at the Basingstoke police investigation centre deemed that he was impaired. A sample of blood could only be taken with his consent, which he did not give.
Hampshire Police previously said the charges followed a single-vehicle collision near the M3 southbound, near the Minley interchange.
The force said no other vehicles were involved and no injuries were reported.
Sterling most recently played for Feyenoord in the Dutch Eredivisie, having left Chelsea in January, but made just eight appearances in the Netherlands.
In four years at Chelsea – including a season-long loan at Arsenal – he made 59 league appearances after signing from Manchester City in 2022.
With City he won four Premier League titles, having started his senior career with Liverpool before moving to Manchester in 2015.
He is currently without a club.
In the 2021 Queen’s Birthday Honours, Sterling was made an MBE for services to racial equality in sport.
Sterling, who was seen listening attentively in the dock, was granted unconditional bail.
He will appear in court on 25 November, and has been disqualified from driving in the interim.