JC Chasez had a serious brush with danger yesterday -- when somebody tried to break into his home in the Hollywood Hills ... while the former boy-bander was INSIDE the house.
Law enforcement sources tell TMZ ... Chasez called 911 after someone tried to break a window in the home in an apparent attempt to get inside the house.
We're told the former *NSYNC star heard the noise ... approached the suspect ... and began shouting at the man. We're told Chasez then called 911 ... and the suspect fled the scene.
We're told cops quickly arrived to the home and began a manhunt, the suspect -- described as a "white male" -- got away.