In 1828 Sir Robert Peel, then home secretary, and later prime minister, reorganized the London police force into a modern law enforcement agency.
Officers in the new department were known at first as “peelers,” after their Irish counterparts in a similar reorganization when Peel was secretary for Ireland some years earlier.
Bobby is the shortened, familiar form of the proper name Robert.
“Peeler” was gradually replaced in the public vernacular by “bobby,” and members of the London force are still known as bobbies today.