A young Afghan asylum seeker has died at the Yongah Hill immigration detention centre, north-east of Perth.

The man, who was in his twenties, is believed to have died of a heart attack.

The Department of Immigration and Border Protection confirmed a man had died on Friday night and said WA Police attended and would conduct an investigation.

Refugee advocates claimed the man had self-harmed, but in a statement the department said there was no indication of suicide or suspicious circumstances at this stage.

"The department extends our deepest sympathy to the individual's family and friends," it said.

"Appropriate support is being provided to detainees and staff at the centre."

A detainee inside the centre, 80 kilometres north-east of Perth, who did not want to be named, said the man had been unwell for some time.

"He had a heart attack, he died by heart attack. He'd been sick for two weeks," the detainee claimed.

Another detainee, who also did not want to be named, said detainees from the Middle East reacted angrily to the news of the death.

He told the ABC chairs were thrown and abuse directed towards officers.

"I was woken up at one o'clock in the morning by huge mayhem, people shouting, screaming things flying in the air ... as police officers were in the other compound trying to keep at bay all the angry detainees," he said.

"They just threw chairs and things beyond the fence at the police van and they shouted abuse but that's normal when you go into such amount of shock and grief; you just lose your mind."

The detainee said he had previously spoken to the Afghan man who died, and said the man had told him he had two children in Afghanistan and had spent more than two years in detention.

"I have been here 102 days and I have been talking to him many times. He was even able to speak a little bit of French with me, and he was such a sweet guy; he was just waiting for an answer," the detainee said.

"He said to me, 'I'm waiting, I'm waiting, they don't give me any answers'. He was always friendly, polite saying, 'Please, will you let me know'."

The Refugee Rights Action Network released a statement, claiming the Afghan man had been bashed several weeks ago by "501" detainees who are foreign nationals awaiting deportation after serving prison sentences in Australia.

"RRAN has expressed concern and anger on many occasions at the mixing of these two cohorts at Yongah," it said.