The bodies of the men, who were aged 25 and 28, were found at the property in Kirkland Street, Maybole, at about 20:00 on Monday.
Post-mortem examinations will be carried out in due course to establish how the men died.
A spokesman for Police Scotland said that inquiries into the men's deaths were ongoing.
The deaths of two men at a house in South Ayrshire are being treated as unexplained, police have said.