In 1903, Lefroy was appointed entomologist to the Government of India (succeeding Lionel de Niceville, who was the first entomologist, appointed in 1901). Then in 1905 he was involved in the creation of the Imperial Agricultural Research Institute in Pusa, in the Indian state of Bihar, and he was appointed the first Imperial Entomologist.
Lefroy convened a series of meetings on an all-India basis, to bring together all the entomologists of the country. From 1915, five such meetings were held at the Imperial Agricultural Research Institute, and these formed the foundation of entomological knowledge in India. He was succeeded in the position of Imperial Entomologist by Thomas Fletcher.
In the early 1920s, Lefroy was asked by Sir Frank Baines, Principal Architect of the Office of Works, to study ways of exterminating death watch beetles that had been found in Westminster Hall, beside England's Houses of Parliament. As a result, he went on to devise various successful formulations for pest control, and in time Lefroy began receiving regular orders from people who had heard about his work. In 1924, Lefroy and his assistant Miss Elizabeth Eades started supplying bottles of woodworm fluid from a small factory in Hatton Garden, which later led to the formation by them of a company called Rentokil Limited (now Rentokil Initial) in 1925.
Lefroy was accidentally killed by poisonous fumes in a laboratory accident later that year.