Leading by example is one of the most powerful methods to encourage individuals to work toward a common objective. Despite the importance of leadership, little is known about how the effectiveness of leading by example depends on institutional features, such as the transparency and design of leaders' compensation contracts. We conduct two experiments to study this interplay between leadership and contracting in organizations with social missions (i.e., socially driven organizations). We find that under non-transparent contracts, leader contributions to the social objective positively influence follower contributions, reflecting effective leading by example. More importantly, under transparent contracts, the positive effect of leader contributions on follower contributions is diminished by an increase in the intensity of variable compensation and/or the amount of fixed compensation in the leader's contract. Our study informs the debate on pay transparency and demonstrates that organizations need to carefully consider the effects of contract design on leadership effectiveness.