Officers who were on patrol on the 7500 block of Mulholland Drive made the arrests Wednesday morning, according to the Los Angeles Police Department.
Some community members alerted the officers that two suspects had just damaged the property with spray paint before fleeing in a white Mercedes sedan. They found the car a short time after and took them into custody.
They've been identified as 35-year-old Jacob Smith and 19-year-old Thomia Fagan.
Several spray cans and a loaded unregistered firearm was found in one of their bags, police said.
Neighbors have described the mansion along Multiview and Mulholland drives as a headache and safety hazard. The home has been covered in graffiti from taggers, and squatters have been coming and going to the property for more than two years.
Neighbors fed up with abandoned Hollywood Hills mansion covered in graffiti
According to public records, the property owner is John Powers Middleton - the same person who owns another Hollywood Hills mansion that was also taken over by squatters. Eyewitness News reported on the run-down conditions at that property a year ago.
Both vacant homes have been repainted this week and there are now fences and security to keep people out.
Middleton's father owns the Philadelphia Phillies.