Johnny Depp has taken time out from shooting the latest instalment of the Pirates of the Caribbean to visit sick kids in a Brisbane hospital.

The 52-year-old star tried to keep the trip under wraps and had asked staff not to publicise what was supposed to be a private visit to the Lady Cilento Children's Hospital.

However, photos soon emerged on social media of Depp decked out in his Jack Sparrow costume cheering up kids in the wards.

Amongst those who got to meet Depp was seven-year-old Max Bennett, who suffers from transverse myelitis, a rare neurological disorder which had him in an induced coma and on life support just weeks ago.

Max and his mum Rachel were having dinner when they spotted an out-of-the-ordinary black helicopter land at the hospital.

A staff member told them Jack Sparrow was upstairs.

"He was going from room to room seeing all the kids who couldn't get out of bed," Ms Bennett said.

"We waited out of the front of one of the rooms, and he came up to us and had a really good chat to Max."

Depp was joking around, trying and failing to spell Max's name in a theatrical fashion and gave him some "gold coins", which were engraved with pirate heads.

Despite already meeting Max, about an hour later Depp then visited the rehabilitation ward where he and other children were being treated.

"He was taking his time to make sure he spoke to each and every one of them," Ms Bennett said.

"It was really beautiful. Everyone kept on trying to move him on, but he kept on coming back.

Loading...

"He came on the condition that he wasn't pushed along and crowded by adults and he could spend as much time as he wanted with the kids.

"He was here for the kids."

Max, whose favourite movies are Pirates of the Caribbean, said meeting Jack Sparrow was the best part of his day.

"[His costume] was pretty cool," he said.

"He was funny.

"He tied a knot in his hair to make a beard, that was my favourite part."

Depp arrived on Queensland's Gold Coast earlier this year to film Pirates of Caribbean 5: Dead Men Tell No Tales, however some scenes have been filmed in Raby Bay Harbour, east of Brisbane.