Yes, this did in fact happen. The game E.T. the Extra-Terrestrial was notoriously bad and highly criticized, and Atari sent the left over unsold games to a dump to be buried. They were buried in Alamogordo, New Mexico in 1983.
There is a back story behind the mass burial as well. In 1982, Atari had created a port of Pac-Man to their 2600 console. They created more Pac-Man game cartridges than they had sold consoles to the date, confident that their sales numbers would be high, and that Pac-Man would bring in more console sales as well. However, Pac-Man was received poorly, and despite selling 7 million cartridges, Atari was left with 5 million unsold copies. When it came to E.T., creating a video game based on a movie was not a common practice at the time. Unfortunately, the game was a commercial failure, as it was so bad, Atari only sold 1.5 million of the 5 million cartridges they produced for the game.
These two big failures, in addition to the decline of videos games during this time period, left Atari with tons of left over game cartridges that they could not sell, so they decided to just get rid of them.
I found a video of them digging the cartridges back up after years of sitting underground! Some other things that were also dumped there were the consoles, some other games (such as Centipede as seen in the one screenshot in that link, as well as Pac-Man, Yar's Revenge, Defender, Star Raiders, and Space Invaders) and news articles about the event.
Reportedly, 728,000 cartridges were buried there, as stated by James Heller, a former Atari manager who was present at the time of the dig-up. He also stated that there were plans to cover the games with concrete as well, but that didn't happen. Only about 1,300 cartridges were found in the dig-up, as the rest appeared to be buried deeper than anticipated.