Buildings consume a significant amount of electricity, which is normally generated from dirty sources causing an increase in carbon footprints. To reduce carbon footprint, distributed renewable energy generation has been proposed. However, the amount of renewable energy harvested normally does not match the amount of energy consumed in individual homes. To address this mismatch, we propose a distributed solution to share renewable energy among homes, which form a microgrid. Specifically we (i) design an incentive-driven distributed energy sharing system (iDES) in a microgrid to enable effective energy sharing and reduce the communication overhead, and (ii) develop energy sharing pricing model to incentivize energy sharing. The energy sharing price generally reflects the installation costs of on-site renewable and energy storage units, the dynamic changes of energy supply-demand relationship, and the remaining energy level of batteries. We validated the effectiveness of our system with extensive evaluations that use empirical traces. The results show that our energy sharing pricing model can effectively motivate and encourage homes to share energy.