Concerning your question about magic realism in Beloved, no one can speak for the writer. We can only tell you what the effects of magic realism are in the novel.
First, magic realism, according to the enotes Study Guide on the subject:
Magic Realism is a literary movement associated with a style of writing or technique that incorporates magical or supernatural events into realistic narrative without questioning the improbability of these events. This fusion of fact and fantasy is meant to question the nature of reality as well as call attention to the act of creation. By making lived experience appear extraordinary, magical realist writers contribute to a re-envisioning of Latin-American culture as vibrant and complex.
The Study Guide cites Latin America because that's where the technique originated, but the Guide's statements apply to the fictional world of Beloved, as well. Morrison certainly makes the world of her novel "appear extraordinary," and her work certainly could be seen as a re-envisioning of that world as "vibrant and complex."
The key to magic realism is the inclusion of the supernatural in realistic narrative. The world of the novel is realistic, with the exception of the presence of the supernatural. But the world presented is not a fantasy world, it's a realistic world.
In Beloved, the daughter's ghost that haunts the mother is the mother's regrets and wishes and anxieties and guilt given form. The ghost is a metaphor, albeit concrete and tangible, for the mother's regrets, etc.
Magic realism enables the speaker to present that which haunts the mother in an eerie, emotionally powerful, poignant (having a quality of specialness) form.
Magic realism is the blurring of what is real and what is supernatural. In Toni Morrison's novel Beloved the reader experiences this concept immediately in the book. Sethe, an escaped slave, is haunted by her murdered baby. The infant leaves behind traces of her tantrums when she tosses things in the house, is heard crying, and tries to continue to gain her mother's attention. The reader automatically begins to assume that when the mysterious young woman shows up that she is Sethe's baby brought from the beyond.
Morrison had to use this venue in order to introduce the reader to the murdered baby. Sethe is a real person in the story haunted by her terrible past but trying to get by in a world that is a little better, but still keeps her trapped by her previous life. The damage done to Sethe and the other slaves did not end just because they escaped or were later freed. It continued to affect them spiritually, physically, and psychologically.
Just as much as the baby haunting Sethe occurs so does her past actions and life. The sins of the past and the cruelties of the past never really leave Sethe. Morrison shows this through Sethe’s magical connection to her baby and to her connection to her daughter Denver.