This story seems completely made up, but still, someone had to made that up. How did this story became so famous? And if it's true, who told that? How do we know of it?
The story comes from David Hackworth. Hackworth is both an officer who was very praised while also being a controversial figure. Without going getting too deeply into it, Hackworth was someone who actively promoted the idea that American soldiers should "outguerrilla the guerrillas" and tried in many ways to implement it, with varying results. His most famous achievement was the creation of the 101st Airborne Division's Tiger Force (which would go on to commit a string of war crimes albeit after he had left the country) and for developing the 4th Battalion, 39th Infantry, 9th Infantry Division from a hopeless case to a "hardcore" unit. It is from his memoirs about the latter case, Steel My Soldiers' Hearts: The Hopeless to Hardcore Transformation of 4th Battalion, 39th Infantry, United States Army, Vietnam (2002) that the story comes from. Hackworth mentions it within the context of some construction that was occurring at Fire Support Base Danger:
At one stage of the work, one of the dozers uncovered a slightly moldy VC body, complete with an AK-47. I jumped down in the hole and yanked the AK out of the mud.
"Watch this," I said, "I'll show you how a real infantry weapon works."
I pulled the bolt back and fired thirty rounds--the AK performed as though it had been cleaned that day rather than buried in a marsh for a year. This was the kind of weapon our soldiers needed and deserved, not the M-16 that had to be hospital clean or it would jam.
The first thing that strikes me is that this is written many, many decades after the fact. Steel My Soldiers' Hearts was written in response to the War on Terror, in particularly the invasion of Afghanistan. This is therefore not a personal memoir in as much as it is a memoir by a decorated officer who made a post-war career as a journalist who is trying to make his case for how the war in Afghanistan has to be fought. Human memory is easily affected by what is known as historical or collective memory, the way the past is represented. Re-occurring stories that have their origins in the Vietnam War finds its way to a mythology, in this case surrounding the AK-47. How many times have we not heard of a soldier finding an AK-47, buried in a stream or in the ground, which was fully functioning? As this story is repeated and rehearsed, it becomes part of a larger repertoire of associations that make certain concepts 'authentic'.
Returning to the story itself, I am highly skeptical this actually happened. I don't doubt the fact that American soldiers have found AK-47:s after a brief engagement with a Main Force PLAF unit, for example. Or that they had found AK-47:s buried in a supply cache, which was a common way of storing supplies (including weaponry and food) for coming operations. Yet the idea that a Main Force PLAF soldier was buried together with his AK-47 seems highly implausible for two reasons depending on the scenario in which the soldier died:
The PLAF soldier was part of an assault on the FSB (which, actually, was under construction at this time) and was killed outside of the perimeter. The soldier's body was left behind after the failed assault and was for some reason buried or covered afterwards together with an AK-47. This would be highly irregular as bodies would often be removed from the battlefield together with any weapons by American soldiers as proof of a killed enemy combatant. In fact, this is exactly what Hackworth does after finding the body, calling it in as a kill ("In good 9th Division tradition, we didn't say both were encrusted with moss and mud"). That an American would have missed an AK-47 or an enemy body seems highly implausible.
For some reason, the PLAF soldier was buried by his comrade together with his AK-47. This, again, is implausible. What would be the reason for a perfectly usable AK-47 to be buried with a soldier who had no use of it anymore and could instead be given to another soldier or stored for future use? It was common for PLAF and PAVN soldiers to try and retrieve bodies and weapons from the battlefield to avoid them falling into enemy hands. While dead soldiers would be given a burial, there are no indications that they were ever buried with their weapons.
While the story is therefore implausible, it might very well be that Hackworth perhaps constructed a memory from a different series of memories or that he did, indeed, make it up. It is clearly an anecdote meant to push forward an argument: The AK-47 was superior than the M-16, although the phenomena that Hackworth spoke of would have been common in the early years of the war. By 1969, this would have been an issue that had been rectified. The AK-47 vs. M-16 argument remains a heated debate to this day. (It is possible, too, that Hackworth was including this to add an argument to the contemporary discussions surrounding the weaknesses of American small arms in the Afghan environment that was particularly emphasized by Operation Anaconda in March 2002).
Hackworth's book became a bestseller, with several reprints, and the author's authoritative reputation enhances the 'authenticity' of a throw-away anecdote like the one you are asking about. The amount of people who read the book could easily have shared it and contributed to its spread, but it was also reprinted in other books, such as Larry Kahner's AK-47: The Weapon that Changed the Face of War (2007) which used Hackworth's anecdote to support his arguments and to make his narrative more colorful.