Miley Cyrus climbed a tree for the Gram -- and now, she's been taken to task for it.

The singer slipped into a floral onesie Tuesday and perched herself in a Joshua tree. Good fun, right? Not exactly ... because the Joshua is a protected species in California -- and as soon as Miley posted a few pics of her tree climbing ... a lot of her followers started blasting her for arboreal adventures.

One user wrote, "Joshua trees are dying out because of their fragility, and folks climbing on them isn't helping curb that. Delete this before more damage is done."

Joshua trees are currently endangered, and what's more ... they have shallow roots that can't withstand extra weight -- ya know, like a human hanging from them.

Waiting for your permission to load the Instagram Media.

Posing with or on Joshua trees is a major fad right now among the young and "free-spirited" ... although most of 'em get grilled for it, just like Miley. There's actually a social media account dedicated to the cause called @joshuatreehatesyou.