One police officer was injured and 27 Madurese were arrested after a two-stage attack on the Abdul Aziz Hospital in Singkawang, a town near the western coast on the island.
Witnesses said trouble flared when three men tried to enter the hospital.
"They apparently wanted to attack about 30 Malays being treated," said a hospital official, who spoke on the condition of anonymity.
Most of the Malay patients had been wounded in ethnic fighting during recent days.
About one hour later, a larger group of Madurese tried to force their way into the hospital, but fled when security guards fired shots into the air.
The attack came one day after a massive riot in which outnumbered police and troops fired on thousands of villagers demanding the release of relatives and friends jailed for earlier violence.
More than a dozen people, mostly indigenous Malay and Dayak villagers, were killed in street battles outside Singkawang on Wednesday.
The area has been wracked by communal fighting in recent weeks.
Most of the victims were migrants from Madura, an island off east Java, who have settled in Borneo in recent years, triggering resentment among indigenous groups.
Some attackers have mutilated the bodies of the dead.
Thousands of terrified Madurese have fled their homes and have been sheltered in government buildings and sports stadiums in the provincial capital of Pontianak.
Indonesia has been plagued by escalating civil unrest since last year's ouster of authoritarian President Suharto, who had used the might of the military to keep a lid on simmering ethnic and religious tensions.
Religious rioting between Muslims and Christians also has flared in Maluku, a province in eastern Indonesia. More than 200 people have been killed in the region, known as the Spice Islands in the Dutch colonial era.
Bloodshed has been reported in the disputed territory of East Timor as well. The Roman Catholic Church estimates at least 25 people were killed in a massacre by anti-independence militiamen on Tuesday.
East Timor's people are bitterly divided on whether the former Portuguese colony, invaded by Indonesia in 1975, should become an autonomous state within Indonesia or break away altogether.
Some fear the violence could derail United Nations plans to stage a ballot on the issue in July.
By Alex Ginting