Aaron Francis Hyland, of Cranbrook Court, Belfast was also charged with unlawful and malicious wounding, and possessing an offensive weapon, namely a claw hammer.
Hyland, who spoke only to confirm his name and that he understood the charges when he appeared at Derry Magistrates’ Court this morning.
He was further charged with assaulting and threatening to kill police and possession of a class B drug.
The charges relate to an alleged incident at Glenabbey Drive in the Galliagh area of Derry on Friday night last.
The alleged victim remains in a serious condition in Altnagelvin Hospital.
There was an extra police presence in the courtroom for the brief hearing during which Resident Magistrate, Barney McElholm, threatened to clear the public gallery after a member of the public shouted abuse at the accused.
A PSNI detective sergeant told the court he could connect the accused to the charges.
In response to questions from defence solicitor, Jack Quigley, the police witness told the court the accused remained in the vicinity and had called an ambulance.
Hyland was also charged with a number of offences, including disorderly behaviour, resisting arrest and damaging a police vehicle, in an alleged incident which occurred on 20 September at Carlisle Road in Derry.
He was remanded in custody to appear back at Derry Court on 23 October next via video link.