It's older than that. It's naval slang for the city going back to at least the early 19th century. No-one quite knows the derivation, but it may just be a deliberate mispronunciation of the name which stuck.
People from Hartlepool are known as 'monkeyhangers' from the tale that, during the Napoleonic Wars, a chimp was found on board a French ship and hanged by the citizens of Hartlepool, who thought it was a Frenchman.