It played somewhat like a movie. In fact, the reason I didn't try to write it down right after I woke up is that I thought it was a story I'd seen somewhere. Like many of my dreams, I moved back and forth between observing and identifying with the main character.
The protagonist was a man from the present time. Somehow, he'd ended up transported into the dream's setting. Looking back, it's not clear to me whether the setting of the dream was supposed to be fantasy, or sometime from history, or just a strange take on the present. I will just pick a tack and stick with it, for simplicity's sake.
The protagonist (I'll call him John) wound up as part of an emperor's court. He had taken the place of a specific figure from the court, known as "the Butterfly". The Butterfly's role in the court was bodyguard and champion for the emperor. The whole court had a faux-Asian feel to it. John, being a normal 21st century guy, had no fighting skills, but this wasn't important through most of the dream, since no one was directly attacking the emperor. John was more of an observer to the action. He fell in love with a woman from the setting; I don't remember who she was -- maybe another member of the court, or the emperor's daughter, or just a maid.
He also watched as the emperor dealt with another man who was plotting against the throne. The emperor did this very skillfully, finally manuevering the plotter into a position where he had to make a direct challenge. At that time, the emperor sent his champion to fight the plotter. Normally, this would be the equivalent of a death sentence, since the emperor's champion -- the Butterfly -- was reknowned as the best fighter in the world. But, of course, John was impersonating the Butterfly, and he had no idea what was going on. "Wait, what do you mean I have to fight this guy?" His love interest had to take him aside (she knew he wasn't the real Butterfly) and explain to him that his was part of his job. She said the man he was supposed to fight had no martial skills, either, and John was younger and stronger, so he could probably take him anyway.
As John was picking out his weapon -- a sort of bladed fan, nasty-looking thing -- I realized I'd seen a prequel to this story, or the same story told in a different way. In the other version, John fell in love with the emperor's wife. The emperor, instead of being a decent man who simply didn't know John was not the Butterfly, was a crooked old schemer who realized John was an imposter, and that his wife was in love with him. For some reason, the emperor didn't want to confront John directly in this version. Instead, he manuevered one of his enemies into challenging the Butterfly. This time, John knew that the emperor was deliberately pitting him against a skilled enemy. The emperor knew that either his enemy would kill John, thereby ridding him of rival, or John would miraculously win the fight, thereby ridding the emperor of his enemy. I don't know how either fight resolved.