Yes, the two shows definitely take place in the same universe. I recall a first season episode where Magnum is flying in a helicopter and announces himself as McGarrett, ordering the suspect to stop.

However, I am disappointed that no H50 actor reprised their character in Magnum. Zulu, Herman Wedemeyer, Harry Endo, and Moe Keale all made appearances on Magnum, but as other characters. (Kam Fong also appeared, but understandable that the Chin Ho character wasn't an option).