Lei was born on 16 December 1969 in the city of Xiantao, Hubei, China. Both of his parents were teachers; his father made $7 a month. As a child, he was interested in electronics and liked disassembling and re-assembling radios, which was encouraged by his father. He made the first electric lamp in his village using two batteries, a bulb, a self-made wooden box, and some wires.
In 1992, Lei joined Kingsoft as an engineer. He became the CEO of the company in 1998 and led it towards an initial public offering on the Hong Kong Stock Exchange in 2007. On 20 December 2007, he resigned as president and CEO of Kingsoft for "health reasons".
In 2000, Lei founded joyo.com, an online retailing platform, which he sold for US$75 million to Amazon.com in 2004. In 2005, he made a $1 million investment in YY; those shares were worth $129 million when the company became a public company via an initial public offering in 2012.[11] In 2008, he became a chairman of UCWeb.
In 2011, he co-founded Shunwei Capital (Chinese: 顺为资本), an investment company, via which he invests in companies in the e-commerce, social networking, and mobile industries. Also in 7 July 2011, he rejoined Kingsoft as chairman.