The screenplay for the film was written by the director Maria Luisa Bemberg and Uruguayan writer Antonio Laretta. Bemberg is known in Argentina and throughout the world as one of the (few) women directors whose films have an implicit feminist value. By 1971, she was one of the founders of UFA--Union Feminista Argentina. In Yo, la peor de toda, Bemberg voices her critique of a male-dominated society that does not want to allow the intellectual development of women, keeping them under control by all means necessary. Through Sor Juana, the director expresses her own opinions against her contemporary society that has not changed much since 17th-century Mexico.
The source of the screenplay is Octavio Paz's book Sor Juana or, The Traps of Faith. The Nobel prize laureate has used all the historical documents that he had access to in order to trace the life of Sor Juana as accurately as possible. The film follows Paz's book in the details of Juana's life, such as her illegitimate origin, the time she spent as lady-in-waiting at the Vicereine's court in Mexico City, the role of Father Nunez de Miranda in her taking the veil, and the events that followed the writing of the famous theological pamphlet, the Carta Atenagorica. Bemberg speculates more about the nature of the relationship between Sor Juana and the Vicereine (the Marquise de Lara), perhaps because this allowed the director to express her feminist views more clearly. Even though Paz mentions that Sor Juana was the one to renounce her confessor (in a recently discovered letter), Bemberg prefers to show that Father Miranda was the one who refused his services to Juana, maybe to suggest that in the end there is no other way for Juana but to repent, as the only "safe" choice for a woman alone in a male- and bigotry-dominated society.