From the Battle of Endor Wiki:
Moff Jerjerrod, remembering his orders from the Emperor to destroy the moon if the shield was brought down, began to rotate the Death Star toward Endor.
Why was that order given? What would that accomplish?
In the novelization of Return of the Jedi, after Palpatine says "Your fleet is lost, and your friends on the Endor moon will not survive", he then signals Jerjerrod via his commlink and says something to the effect of:
"Commander, if the Rebels manage to bring down the shield, you will turn this station towards the Endor moon and destroy it."
"Sir, we have several battalions stationed on..."
"You will destroy it." The Emperor's whisper was more final than any scream.
This was done in front of Luke, as part of his temptation of Luke to go for his lightsaber. From the moment Palpatine loosed Luke's cuffs, Palpatine was trying to goad Luke into acting in anger. He does an admirable job, ratcheting up the frustration and helplessness as to the situation of everyone outside the Emperor's throne room. Eventually, Luke gives in; Palpatine has convinced him that the only way he can stop this is to cut the head off the snake (in more ways than one).
This order plays out to the final scene of Jerjerrod's character in the book, as evidenced in Wookieepedia; while the shield is down and the fighters are in the superstructure, Jerjerrod is ordering the last remaining petty officers who haven't run for a shuttle bay to speed up rotation, so he can carry out his order before the station is destroyed. Jerjerrod is portrayed in the movie as a rather jelly-legged lackey of the Emperor and Vader. In the books, as implied in the film, he basically had Moff Tarkin's position aboard the station, in charge of the day-to-day operation and ongoing construction. He is characterized as a truly evil person, whose first love is war, and whose second love is total destruction.
In the Ep VI novelization, Jerjerrod doesn't remember anything; Palpatine gives the order in the throne room scene, simply to force Luke's hand into a decision: either join Palpy, or watch his friends die. There's even an objection from some underling or another, that there is still a legion of their finest on said moon, which Palpatine overrides.
I leave it to someone else to say whether or not this appears in the movie proper; I don't remember one way or another.