A 26-year-old man has died after receiving a massive electric shock while attempting to graffiti train carriages in a Brisbane railway yard.

Police said two men, aged 26 and 19, entered a rail shunting yard at Tennyson on Brisbane's south side about 8:30pm (AEST) on Saturday night.

Officers said the men were attempting to graffiti train carriages and when the 26-year-old climbed onto one of the carriages he raised his hands and sustained a massive electric shock.

The man received deep thickness burns to 90 per cent of his body and was taken to the Royal Brisbane and Women's Hospital, where he later died.

The 19-year-old man was charged with trespass, wilful trespass on a railway and wilful damage by graffiti.

Queensland Rail (QR) is assisting officers with an investigation.

QR has told the ABC it leased the site to rail freight company Pacific National, which was responsible for security in the area.

On Sunday, police renewed warnings about the dangers of trespassing into railway yards.

Regional duty officer Inspector Daniel Bragg said the powerlines carried 450,000 volts.

"When police arrived the ambulance was already [at the scene]," he said.

"They were advised that two males had entered the railway yard - one of them had climbed onto a commercial container that was on the line and came within the proximity of an overhead line and was electrocuted.

"What I'm advised is that the staff at the shunting facility here observed a flash or perhaps a flame, and they went over and they observed the male person to be sitting on top of the carriage near the power line."

Inspector Bragg said the man's friend was approaching the carriage and it was his friend who phoned for an ambulance.

"It's just a terrible, terrible thing and police hate going to jobs like this and the sad thing about it is this could be so easily avoided," he said.

"Railway lines and railway shunting yards are very dangerous places - police are often called to jobs where people have been injured or killed on properties like this.

"You don't have to actually touch the lines to be electrocuted. You just have to be in close proximity.

"The message here is quite simple: don't go near train lines.

"There are dangerous things in and around train lines, not the least of which are power lines which may be almost invisible of a night time with little or no lighting."

It is the second death in two months linked to graffiti on Brisbane trains.

A man was killed when he fell onto tracks while train-surfing at Runcorn on September 25.

Police said CCTV footage showed the man had been spraying graffiti on the train when he fell to his death.