Your historical recollection is incorrect. Thoreau was a strong proponent of limited government and it's utility. What he was against was tyrannical overreach and abuse of power, such as, for example, a gov't investigating who lied in a spat between coworkers.