Meek Mill took over Justin Bieber’s glass mansion for Grammy weekend and threw a party so wild … cops had to be called and the crib was destroyed when it was all said and done.

Mill hosted the massive Grammy after-party Sunday night — Nicki Minaj, French Montana, Khloe Kardashian, Chris Brown and Justin were at the bash … and sources inside tell us it got crazy when a fight broke out between rival gang members.

During the melee, we’re told punches and even ice sculptures were tossed — and most of the guests fled into the street. Law enforcement sources said cops were called around 1:30 AM for loud music, and found more than 1,000 people walking around the ritzy ‘hood. It took about 3 hours to clear the streets.

No arrests were made, and police never went inside the house — which was totally trashed.

We’re told Justin moved out last week, and Meek moved in … signing a 1-week lease to lock down the party location.

We’re guessing he can kiss that security deposit goodbye.