But he blamed his meltdown on the torrent of online abuse he received in the wake of his controversial appearance on Celebrity Big Brother.
He was handed a £3,325 fine and banned from the roads for two years today for failing to provide a specimen and causing £120 of criminal damage.
Ealing Magistrates' Court, in west London, heard the 30-year-old singer had been out partying to celebrate his best friend and bandmate Duncan James's birthday on the night of his arrest.
Officers spotted Ryan swerving erratically at 5.30am on April 11 as he drove his female friend's Audi A3 on the Uxbridge Road in Ealing.
There was an empty bottle in a pocket by the driver's seat and he stank of alcohol and slurred his words as he got out of the driver's seat.
Majit Mahal, prosecuting, said: "Officers could immediately smell alcohol from Mr Ryan's breath and his eyes appeared glazed.
"Asked if he had consumed some alcohol that night, Mr Ryan said 'Yes, a few'.
"Officers then noticed that there was an empty bottle in the pocket of the driver's seat. When Mr Ryan exited the vehicle, he was obviously unsteady on his feet, his speech was slurred."
He was in such a "drunken state" that officers took him straight to the police station.
But he refused to take a breath test to see if he was over the limit and repeatedly swore at officers, branding one a "c***".
Mr Mahal said that when officers warned Ryan he would be prosecuted if he did not provide a specimen, he replied "F*** off".
Ryan then shouted: "F*** off, f*** you, you f****** c****, f*** off."
The slurring star became aggressive to officers and was marched to a cell at Acton police station where he urinated and was sick all over the floor.
Mr Mahal said that when officers returned to the room where Mr Ryan had been placed, they could see urine was leaking from the door into the hallway.
The star is said to have told officers "I didn't realise there was a toilet here".
Asked by the officer "Do you do this at home?", he said "Yes I do, f*** off you c****".
In a police interview later that day, Ryan told officers he had drunk a vodka and tonic and a rum and Coke, but thought he was OK to drive.
He told officers he was on antidepressant medication and antibiotics, which he blamed for his state.
Mr Mahal said: "He believed his drink may have been spiked, because normally he would have been fine.
"Officers explained to Mr Ryan that his conduct towards officers had been abusive and he was challenged about the language he used.
"Mr Ryan said he had no memory of the conduct or the words he is alleged to have used."