Troops have surrounded the university and are engaging the attackers.
Witnesses spoke of the gunmen firing indiscriminately and there are fears the casualty toll could rise.
It is not clear who is behind the attack, but Somali al-Shabab militants have regularly targeted Kenya.
Garissa and other border areas have been regularly attacked.
Some five masked gunmen are said to have stormed the university. There are reports that hostages have been taken.
Kenyan police said the gunmen shot guards at the main gate at about 05:30 local time.
Nearby policemen then engaged in a fierce exchange of fire and the gunmen escaped into the university buildings.
Security forces were now trying to “flush them out”, a police statement said. It urged people to stay away from the area.
Two guards were confirmed killed at the main university gate, with two policemen and a student among the injured. But eyewitnesses spoke of many casualties inside the building.
The gunmen reportedly ordered students to lie down on the floor, but at least 27 are known to have escaped and are at a military facility.
Kenyan Red Cross spokeswoman Arnolda Shiundu said there were about 30 casualties, four of whom were critical.
Three people – two soldiers and a civilian – had been airlifted to the capital, Nairobi, Arnolda Shiundu said.
The university opened in 2011 and is the only place of higher education in the region. It has some 900 students, 700 of them from other parts of Kenya.
Garissa, 90 miles from the border with Somalia, has a large population of Kenyan Somalis.
Al-Shabab has carried out a number of attacks in Kenya since 2011, when Kenyan troops were sent to Somalia to help fight the militant group there.
The deadliest attack targeted the Westgate shopping centre in Nairobi in September 2013, when 67 people were killed.
Al-Shabab is fighting to create an Islamic state in Somalia and is banned as a terrorist group by both the US and Western Europe.
T8wKKRRgvwIThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…