Such terrible misinformation from speculation in the other replies. Peking is not that much closer to the Cantonese pronunciation (see the voice sample in https://en.wiktionary.org/wiki/%E5%8C%97%E4%BA%AC). Nor is it Wade–Giles, which would romanize it as Pei-ching. Just look up the word's well-sourced etymology in Wiktionary (https://en.wiktionary.org/wiki/Peking#Etymology): the name comes from Mandarin after Mandarin dropped final -k, -p, -t (which are preserved in Cantonese) but before Mandarin palatalized ki > ji. See also https://en.wikipedia.org/wiki/Chinese_postal_romanization. The initial consonant being p- is also expected, since it is closer to the unaspirated p in most European languages than to b-; the Pinyin p- then corresponds to aspirated p.