You can now obtain Mega Kangaskhan in four (technically five if you count SM and USUM as different games) official, non-spinoff Pokémon games: X&Y, Legends: Z-A, SM, and USUM so I might as well cover the ways to obtain it in all these games here:
X&Y
- Get the Kangaskhanite. You will need to find the Glittering Cave in between 8 and 9 PM in in-game time. A useful guide with important details, (the most notable of which being the requirement of the Mega Ring Upgrade), can be found here.
PLZA:
- Unlock Kangaskhanite after Main Mission 9: Chase that Mysterious Pokémon!
- Buy it in the Stone Emporium, on Vernal Avenue in Vert Sector 9 within Lumiose City, south of the Vernal Pokémon Center and north of Promenade du Vent, for 70,000 Pokédollars.
SM/USUM:
- After having beaten The Elite Four and The Champion, you can buy it at the Battle Tree for 64 Battle Points (BP)
LGPE:
A salesman, found inside the entrance to The Pokemon League, will sell Kangaskhanite (and some other Mega Stones) for 30,000 Pokedollars each.
Guide to abbreviations used for people to time-conservative to look it up:
PLZA: Pokemon Legends: Z-A
SM: Sun/Moon
USUM: Ultra Sun/Ultra Moon
LGPE: Let's Go Pikachu/Eevee
Source 1: Experience
Source 2: Various IGN articles
Source 3: The YouTube video linked earlier in this answer
If I'm missing anything, please tell me in the comments.
Hope I helped. FOR THE FROGS!