Keeping players interested in your campaign is about providing constant mental engagement – intrigue, tension, and uncertainty.
Manipulate characters to make them work against themselves. Mix distrust and unease into their dealings with NPC’s. Let it slip that some associates in their characters’ world have hidden agendas or dual loyalties. Have characters gather false, incorrect, or misleading information. Give them conflicting versions of stories from two NPC’s – let the players decide whose version to believe. Mix a little truth into an antagonist’s lies to sow doubt in the characters’ minds.
Foreshadow dangerous circumstances that won’t come to pass. Spring danger from unexpected places. Ask random questions about the party’s security measures, or who is taking watches during the night. Make innocent NPC’s act suspiciously. Have the assassin appear completely harmless. Fool them once. Fool them twice.
Keep the players suspicious and attentive. Players must never feel that their characters are every completely safe. Between encounters in a game session, occasionally make the players roll skill checks to see or hear something – a something you know isn’t there. Then tell them that they didn’t notice anything. They will suspect they failed to notice something and be on their guard.
Other times, ask leading questions (about characters’ resistances to a certain element type, or about items that may warn of undead nearby) to imply an impending danger. Ask to be informed of when characters take a certain action (such as opening a door, going to sleep, eating a meal) as if that is a trigger for an event. Make a point of looking up dangerous creatures in the Monsters Manual and taking notes, right before the characters head out of a safe haven and into the wilderness – especially if you have no intention of using that creature.
If a single character discovers information, provide the information to that player confidentially. In front of the other players, offer that the player may reveal this information truthfully or the character may deceive his associates. Express surprise at what the player tells the other players, as if you did not expect their character to lie (which perhaps he did not, but it will raise doubt in the minds of the other players).
The DM must be fair and honest. But the DM retains the right to be deceptive and to create ambiguity and doubt within the story and the adventure. There is great value in a DM’s ability to use psychology to manipulate the players’ experience in the game session. Create a healthy tension in the adventure to keep the mood interesting.