The bodies of 29-year-old Janet Lockhart and her toddler son Michael, who were named locally, were discovered in Bonnyrigg, Midlothian, at about 8.30pm on Saturday.
Officers went to the house in South Chesters Lane after a "family acquaintance" voiced concern.
Police Scotland said they had arrested a 32-year-old man who was being treated in hospital and that officers were not looking for anyone else in connection with the incident.
Chief Inspector Colin Brown said: "This is a tragic set of circumstances and our thoughts are with the families who have been affected.
"We are grateful for the support we are receiving from neighbours while we carry out our inquiries."
The 32-year-old is expected to appear at Edinburgh Sheriff Court tomorrow.