A man accused of seriously injuring his teacher and several classmates with a baseball bat at the Australian National University is now facing four counts of attempted murder, after prosecutors upgraded the charges against him.

It is alleged Alex Ophel, 18, left several people injured in late August, when he brought a baseball bat to class, hidden inside a black duffel bag.

Documents before the court alleged he stood up and began swinging the bat in the air, before attacking a lecturer and three students.

Four of the victims required hospitalisation, some suffering serious head injuries.

Ophel was arrested at the scene and has been in custody since.

In court today, the charges against him were upgraded to four counts of attempted murder and one count of intentionally inflicting grievous bodily harm.

Ophel appeared calm as his lawyer entered a plea of not guilty by reason of mental impairment on his behalf.

He will reappear in court next month.