Lilly will become a venture partner at Greylock Partners but will remain on Mozilla's board of directors, he wrote in a blog post.
After helping to start several tech companies, Lilly joined Mozilla in 2005 and stepped up from chief operating officer to CEO in January 2008, taking over from Mitchell Baker, who became chairman.
Mozilla's Firefox browser is the most popular alternative to Microsoft's Internet Explorer, with a market share estimated at 25 per cent or more.
Soon after taking over Mozilla, Lilly made headlines by slamming Apple for distributing Safari as a download with Apple Software Update. In that utility, which is used to distribute security updates for iTunes and the Quicktime video software, Safari is selected by default as a choice for downloading. Lilly said that made it too easy for users to install software they didn't ask for and may not have wanted. "This is wrong, and borders on malware distribution practices," Lilly said. He feared it would erode consumers' trust of security updates.
In 2009, Lilly also criticised Microsoft's plan for a 'ballot screen' from which users would choose a web browser.
In his blog post, Lilly said his work with Mozilla began as a volunteer effort and became a full-time job, and that he wanted to return to his first love, working with startups. But he expressed pride in Mozilla's work.
"400 million users are directly touched every day by the work we've done so far, and many, many more are using better browsers because of our work," he wrote in a letter to Mozilla employees.