The spectacle attracted a mass of spectators on the ground watching as police officers and firefighters worked to try to convince the man to come down on his own.
The crane was near Hollywood Boulevard and El Centro Avenue in Hollywood.
He was wearing no shoes or shirt and appeared to be draped in an American flag.
He was spotted climbing and moving around on cables above the crane and slowly descending, then stopping on a platform for more than an hour as he shouted and gestured at the ground and waved the flag.
An urban search and rescue team joined firefighters and police officers who were trying to convince the man to come down.
After about three hours, police said they had the man safely in custody on the ground. He was being treated by paramedics.
It was not immediately clear why he had climbed the crane.
A man with an American flag is climbing up and down a crane on Hollywood Blvd. LAPD and LAFD are on scene, streets between Vine and Gower are closed. It’s unknown why he’s on the crane. pic.twitter.com/wfcvhLucmd— Melissa MacBride (@abc7melissa) April 9, 2018