In 1866, Maskell was elected to represent Sefton on the Canterbury Provincial Council, a position which he held until the provinces were abolished in 1876. He also served as provincial secretary and treasurer during the last year on the Council. Maskell contested the Ashley electorate twice for a seat in the New Zealand parliament. On both occasions, first in the 1871 general election, and then in the 1876 general election, he was unsuccessful against John Evans Brown. After this, he took no further active part in politics.
Entomology
Around 1873, Maskell became interested in entomology and wrote a book, An Account of the Insects Noxious to Agriculture and Plants in New Zealand, which mostly concerned pests in the Coccoidea family. Later, as his work became more well known, he was sent insect samples from a variety of locations, including Asia, Fiji, Hawaii and the Americas, which resulted in him proposing over 330 species names. His collection of Coccoidea specimens was regarded as scientifically significant and was lent to the United States Bureau of Entomology in 1906 for study by Emily R. Morrison. Maskell particularly liked studying the internal anatomy of insects, probably due to his fascination with physiology and microscopy, and his work was also unique in that he studied immature stages of males and females as well as the mature females. After experimenting with kerosene application, Maskell became an advocate of biological control of pests, which involves finding their natural predators. He helped Albert Koebele of the United States Department of Agriculture collect vedalia "ladybird" beetles, a predator of cottony cushion scale, which had become a devastating pest of Californian citrus farms. In its native Australia this pest was kept in check by a dipterous fly Cryptochetum iceryae which injected its eggs into the scale insect, which was then devoured by the resultant larvae. Maskell also studied arthropods, protozoa and microscopic algae, publishing more than 70 research papers on these topics. He was also a strong opponent of Darwinism and his arguments helped to shape several scientific debates of the time.
Death
Maskell died in Wellington on 1 May 1898 at his home from complications that arose after a serious operation. He was survived by his second wife, and he did not have any children.