Shocking footage in which slain rapper XXXTentacion appears to punch a woman in the head has resurfaced online, as it emerges he was set to stand trial for allegedly beating a pregnant girlfriend.

The harrowing Snapchat clip shows a man believed to be XXXTentacion - real name Jahseh Dwayne Onfroy - punch an unsuspecting women forcefully in the head from behind as she dances.

Captioned, "I hate this xxxx," the identity of the woman in the disturbing clip remains unknown.

The 20-year-old - who died in a fatal shooting in Miami, Florida, on Monday - previously insisted the scene was a set-up and that he and the woman were play acting.

"The actors in this video are obviously friends, and also obviously acting in jest," his lawyers J David Bogenscutz and Jaclyn Broudy, said in a statement.

(Image: snapchat) (Image: snapchat)

"You should also be aware that we are advised that the woman in the video has been located and has admitted that activity depicted was a 'joke' and not an 'assault.'"

However, TMZ reported that it was being reviewed by prosecutors ahead of his domestic violence trial.

In August 2017 as his debut album 17 entered the Billboard 200 chart at number two, it emerged that he had been charged with aggravated battery of a pregnant woman, domestic battery by strangulation, false imprisonment and witness-tampering the year before.

He pleaded not guilty to all counts and in interviews denied the woman was pregnant and insisted someone else was responsible for her injuries.

(Image: Tribune News Service)

In her deposition, the woman said she met Onfroy online and claims he began abusing her just two weeks after she moved in with him.

According to court documents, he stomped on her head, kicked and punched the unidentified girlfriend - even when she became pregnant.

In a separate case he was also facing 15 charges of harassing and tampering with a witness of victim. He denied those charges too.

He was later banned from Spotify as punishment, but was posthumously added in the wake of his death.

The rapper was shot while on temporary release from house arrest ahead of his trial.

(Image: Instagram)

Meanwhile, his ex-girlfriend Geneva Ayala - who he also allegedly assaulted - saw donations to her GoFundMe page soar in the wake of his death.

The page says she was beaten so badly in 2016 that fractures in her eye socket are piercing the back of her eyeball, causing damage to the optic nerve.

"The left side of my face has lost some sensation, i cannot feel my upper lip on the left side, and same for my upper teeth on the left side," it reads.

"And as for my left eye's vision, it's diminishing as the days go by. It's crucial i get the surgery otherwise my eyeball will die and the nerve connecting my lip/cheek and teeth will eventually die as well."

At the time of publication she had raised £23,800, taking her over her target of £19,000.