The inspector general was an investigator charged with examining the actions of a government agency or organization, such as Starfleet or the Federation. Their job was to look for the possibility of misconduct, fraud, or criminal activity by individuals in public service.
In 2364, Lt. Commander Dexter Remmick was attached to the Inspector General's Office and assigned by Admiral Gregory Quinn to investigate possible misconduct aboard the USS Enterprise-D, by Captain Picard specifically. (TNG: "Coming of Age")