Police were called to Westridge Road, St Denys, on Friday afternoon. Hampshire Constabulary said there may have been an earlier "dispute".
A 26-year old man and a 35-year-old man, both from Southampton, are in police custody.
The identity of the dead man has not yet been confirmed and a post-mortem examination is due to be carried out.
Residents of the multi-occupancy property have been moved to temporary accommodation.
Det Ch Insp Nick Heelan appealed for witnesses.
He added: "We are following up several lines of inquiry. At this stage we believe this to be an isolated incident and that there is no risk to the wider community."
Two men have been arrested on suspicion of murder after the body of a man was found at a flat in Southampton.