Pretty sure this is The Monstrous Duke's Adopted Daughter.
The Speràdo family line possesses a secret: shadow magic. But it’s been 100 years since someone last wielded it. When Marquis Speràdo tries to sacrifice Leslie for her favored sister Ellie, little does he know that this awakens the power of darkness in her instead. To escape her family’s greed and abuse, Leslie’s out to make a deal with the Monstrous Duke: adopt her, and her powers will be at the duke’s disposal. Will Leslie escape her parents’ cruel grip, or succumb to their evil exploits?
Leslie Sperado is the second and youngest daughter of the noble Sperado family. She is the first member of her family in over a century to be born with dark magic powers, and is cruelly treated by her family, who favour her older sister over her.
They eventually try to sacrifice her by throwing her into a firepit, with the aim of transferring her power to her sister. However, spirits appear in the room, and save Leslie by pushing her out of a window. Leslie later discovers that the Sperado family has made a practice of sacrificing its younger children like this for the last thousand years, and that the spirits who saved her were those of previously sacrificed children. Their resentment over what happened to them is the reason her powers are so strong.
Leslie learns of a powerful, military family, the Salvatore family, headed by the Duchess Salvatore. She seeks the Duchess out and asks to be adopted, in order to escape her own cruel family. The Duchess had wanted a daughter anyway, having only sons at that point, and after listening to Leslie's pleas and seeing the desperation in her eyes, she accepts her into her family. The Duchess is also aware of Leslie's power, and knows she'll be a valuable asset to the family.