What could have happened in his life that would lead to him writing plays that included feminism?
First and foremost, Ibsen is a Realist, and as such he depicts life in Norway as it is during the late nineteenth century, examining social and psychological problems, both. No Feminist, Ibsen sought only to illuminate the social problems of his day; such treatment as that of Nora's was not uncommon.
There are many reasons to write about people's dignity, whether those people are men, women, minorities, rich, poor, etc. This play, A Doll's House, is not about female dignity alone. To read the play correctly, in my opinion, we have to see Nora as a person first and a woman second.
She strives to claim an identity but has to fight against Mrs. Linde first and Torvald later. She is underestimated all-around.
This is not a story of feminism, properly speaking, but of self-assertion.
To understand Ibsen's motives behind creating this book you need to understand his social views. The time that this play was written in was a time when women were opressed by men - their fathers, brothers, and husbands. Ibsen was the type of individual that challenged society, and strongly believed in women rights. Hence, he wrote this play.