This rumor goes back the the 90's Assault Weapon Ban.
At the time, several of the usual totally dense anti-gun politicians and activists wanted to make ammo makers add "taggants" to gun powder. These taggants would allow the police to identify the maker and even the lot of the ammo by the taggant.
It was explained that taggants would alter the powder in unsafe ways and that no military or police organization would allow it in their ammo, and that the unknown and unsafe taggant effects would likely cause explosive accidents.
So, common sense prevailed and the adults dropped the idea.
From that came rumors that the government wanted to put additives in powder or primers that would give ammo an expiration date. Within a set number of years the ammo would simply deactivate itself and become useless.
This would prevent those NRA crazies from stockpiling ammo.
When it was explained that there is simply no possible way to do this, and again, no one military, police or civilian would allow such an unsafe additive, most people understood it was just a rumor.
Like most rumors, it refuses to die.
To sum up, there's no way to put a taggant in firearms ammo because of problems like the taggant and powder separating out and causing massive overloads.
There is no known reliable or safe method of causing ammunition to deactivate itself after a set time.