First, if you are traveling on an American passport, the answer is no. If you're a dual citizen (United States and another country), you can probably enter by rail on your second passport, but mentioning that you're an American would be a very bad idea.

There have been rumors of North Korea opening up domestic trains to U.S. citizens, but I haven't seen this confirmed anywhere. 

If you're not an American citizen, or at least not traveling on an U.S. passport, the answer is yes. There are a few tour operators who organize train trips to the DPRK, but it should also be possible to buy a train ticket in Beijing directly. You can find information on the train times here:

http://www.seat61.com/NorthKorea.htm#.Ux-mMV46ntk

It appears that the train runs four times a week and is usually reliable.

Be sure to obtain a visa for travel to North Korea before departing.

As a previous answer mentioned, the story of two Austrians who used the Moscow-Pyongyang sleeper car is widely available on the web, including at http://vienna-pyongyang.blogspot.com/

I thought their journey was fascinating (and extremely dangerous), but I wouldn't recommend attempting to use this route today.