(Please do correct if I understood it wrong) As per my understanding, you both are male and want to have a baby through the procedure you explained earlier?
First of all, if that is really the case then there is no law under Islam that accepts the marriage of two males. As we all know, homosexuality is haram in Islam.
"And to Lut, when he said to his people, 'do you come to indecency while you are seeing? Do you approach men lustfully leaving women? Rather you are a people ignorant." - Surah An-Naml, Ayat 54 -55
Hence there is no marriage between two men and if there is no marriage then their sexual intercourse would eventually be Haram. (Sorry this isn't your question but I think this is important to mention).
Secondly, if If anyone's sperm goes inside the woman (except her husband) then this is also haram. As touching, talking and even gazing any Na-Mehram is haram let alone putting sperms in her (by any means).
So, as to your question,"If two men could have a baby (e.g. via stem cells), would it be haram?
". Yes, it would obviously Haram.