EXCLUSIVE

Lil Xan's been getting flak from the hip-hop community all week for calling Tupac's music "boring" ... and it seems the criticism's escalated to real-life harassment.

According to a police report -- obtained by TMZ -- the rapper was at a Del Taco in his hometown of Redlands, CA Thursday afternoon when he was surrounded by a group of high school-aged kids who were upset over his comments about Tupac.

There wasn't a physical fight, but the hostile environment was apparently enough to make Lil Xan run to a nearby YMCA ... where an officer picked him up and escorted him to his car safely.

The report says the large crowd was gathered at the Del Taco for a possible girl fight after school ... so the rapper possibly got caught in the middle of the frenzy. We're told no crime was committed against him, though.