Does 上嗨 work as a pun for 上海?
I don't really know the answer, but have some hypotheses.


What you saw is actually part of a sentence such as "在大街上嗨" where 嗨 has the meaning of 啊 (an emotion particle).
It's actually Shanghainese. On Baidu somebody asked for the meaning of 吾雷给欧上嗨吾 (which is supposed to be Shanghainese) and somebody answered 我在学上海话 (I'm studying Shanghainese). So according to this 上嗨 refers to 上海 in Shanghainese. I didn't find any other websites supporting this claim. The answer also got the remark that if it would have this meaning 吾 should actually be 哎吾.
This forum is called "学嗨吾吖" which actually refers to 学海无涯 (no limits to what one still has to learn). In this example the tones are changed and 海 is changed into 嗨). This is something that often happens on the Internet (mostly done by young people and sometimes used to bypass the Great Firewall of China). Some famous examples: 和谐 => 河蟹, 什么 => 神马， 肏你妈 => 草泥马, 压力 => 鸭梨, 央视 => 央屎. So maybe the advertisement wanted to appeal to young people.