Born about 935, she was the daughter of the King Ramiro II of León by his second wife, Urraca Sánchez of Pamplona. She was made a nun by her father, who built the "wonderfully large" monastery of San Salvador in León. By the age of 11, and already a nun, she started to appear in court documents. Under her half-brother Ordoño III of León she held documents important to a land dispute, suggesting that San Salvador had perhaps become a chancery of sorts.
When her brother Sancho I died in 962, she became regent of León for her nephew Ramiro III. Because she was a Leonese, she was preferred by the Leonese nobility as regent before the king's foreign-born mother, and because she was a nun and therefore not likely to acquire a lover or a husband who might want a part of the regency.
In 968-69 the Vikings raided León and Elvira organised the defence of the country. Having sent envoys to Cordoba on a regular basis to pay tribute, in 974 she precipitated a crisis, apparently intentionally, when her ambassadors said to caliph al-Hakam II something so offensive that they were expelled and the translator punished. García Fernández of Castile then took Deza from the Muslims, and the next year, 975, a Christian force bringing together García, Sancho II of Pamplona, count Fernando Ansúrez (king Ramiro's maternal uncle), and the Beni Gómez clan attacked Gormaz. The besieging troops were reinvigorated by the arrival of Elvira and her nephew Ramiro III, who then took overall control and led an attack on the city. This proved disastrous, its repulse allowing an army to emerge from Gormaz that then defeated the Christian armies in the field, lifting the siege.
As an apparent result of this military defeat, Elvira retired from the court, being replaced as regent by her sister-in-law the Dowager Queen Teresa in 975. From this date she occasionally appeared in the royal diplomas of her nephew, but is no longer called queen (regina).
During the rebellions of the reign of Bermudo II of León, she is found executing documents in the company of several of the rebel families, suggesting perhaps that she harbored the hope of returning an heir of her nephew Ramiro III to the throne in Bermudo's place. Her view toward the new king's reign is seen in her last known document, dated 986, in which she makes grant of lands that the king had already given away, suggesting that she did not recognize his authority. The rebels apparently encouraged an attack by al-Mansur, probably hoping for the same outcome as when Sancho I had been reinstated by Muslim armies. However, when Al-Mansur took León and forced Bermudo to flee into Galicia, the general did not install a new Leonese king in his place.
Opinion on Elvira's rule has been divided. Past authors have suggested that she was weak, ruling a divided nobility only with help from her mother's kingdom of Pamplona, until this became untenable. However, Pick has recently presented a different view of her, as ruling a kingdom that drew men seeking opportunity from across the realm and as far as Pamplona and leading a peninsula-wide coalition in resisting Córdoba, and only losing her position as a consequence of a military fiasco.