I start with externals (monsters, kidnappings, dungeons. etc) and let the characters begin to establish goals, desires, pet-peeves, and a moral compass. Then I start to purposely include people and events that will hinder their goals, tempt their desires, aggravate their pet peeves, and challenge their moral compass.
For instance, once while clearing out a temple of Vecna, I had the players pass by a pool that revealed to each of them a disturbing secret about their past or their family. One player discovered that his long lost father was actually a rapist. Another found out that a prophecy had been spoken over his cradle that a friend would betray him to his death. Another found out that the money he had pickpocketed from a man in a pub was supposed to pay the ransom for a little girl. The girl died because the money didn't make it to the drop. These revelations (though not actually "an encounter") had a huge effect on the direction of the campaign.
I came up with these secrets based on what the players had established during dungeon crawls, then created more intimate challenges.