Michelle Owens, 28, was sentenced at Belfast Crown Court after pleading guilty to the manslaughter of Brendan Owens, 3, in their home at Trinity Terrace, Lisburn, in July 2013.
The child died after being suffocated with a pillow.
The judge said he was satisfied that Owens was very unwell at the time.
He described it as a tragic situation for both her and her son and made the hospital order without time restrictions.
A consultant psychiatrist told the court that the defendant was suffering from paranoid schizophrenia and did not want the child to be taken into care because she believed he could be abused in a home.
The court heard that Owens told her son that "mummy's going to help you in case the bad men get you", before placing the pillow over his face.
The judge said he believed Owens had been a loving mother and that she bitterly regrets the death of her son.
A mother who admitted killing her toddler son at their Lisburn home almost two years ago has been placed under a psychiatric hospital order.