Select a worthy challenge. Tell a compelling story. Assemble a good team. Put them in control. Enable the cast of characters to express themselves. Help improve their skills. Be fair and settle disputes. Overcome setbacks, together. Accomplish the mission (against all odds). Make sure it's fun for everyone.
Er wait, no, sorry — this isn't about the role of a Dungeon Master. This is what it takes to lead an engineering team. Who knew it's the same thing?
(PS: Thanks Ben Collins-Sussman for the idea.)