Malia Obama was feeling the music so much she couldn't contain herself ... so she writhed around on the ground in rock 'n' roll euphoria.

Barack's oldest daughter let her hair down in Chicago Friday night at Lollapalooza ... but especially while The Killers were playing. We're told she was with her friends backstage for most of the set, but came out to the general area to dance later.

And dance she did ... and headbang ... and roll around in the grass.

This isn't Malia's first time at the music fest -- she had great seats last year during Mac Miller's set -- and she always seems to have a good time in her former hometown.