To distinguish her from other infantas of the same name, she is commonly known as Eleanor of Viseu (after her father's title) or Eleanor of Lancaster (Lancaster, a name used by some Portuguese royals after her great-grandmother Queen Philippa of Lancaster). In Portugal, she is known universally as Rainha Dona Leonor. She is considered one of the most notable Portuguese queen consorts. She was the second and one of only two queen consorts in Portugal who were not foreigners.
Eleanor was a daughter of Infante Fernando, Duke of Viseu, and his wife and cousin Beatrice of Portugal. Her maternal grandparents were Infante João of Portugal and his wife and niece Isabel of Barcelos.
Eleanor's sister Isabel of Viseu married Fernando II of Braganza, who was later accused and executed of treason by Eleanor's husband King John II. Eleanor's older brother Diogo, Duke of Viseu, was also involved in activities that John II considered treasonous and was executed by the king himself. Her younger brother succeeded John II as King Manuel I of Portugal.
Eleanor married John, Prince of Portugal, on 22 January 1470. She thereby became the Princess of Portugal. The bride was twelve years old, and the groom was fifteen years old. Her spouse was the only living son of Afonso V of Portugal and Isabel of Coimbra and heir apparent to the Portuguese throne. Eleanor and John spent a lot of their childhood together and were good friends.
On 28 August 1481, Eleanor's father-in-law died, and her husband became John II of Portugal, thus she became the new queen consort. The queen consorts of Portugal were awarded fiefs and villages to grant them independent incomes, and Eleanor was granted Silves e Faro and Terras de Aldeia Galega e Aldeia Gavinha for this purpose.
She founded what became the city of Caldas da Rainha, which was named in her honor ("rainha" means "queen" in Portuguese).
Eleanor and John II survived both their sons. Eleanor opposed the wish of her spouse to have his illegitimate son recognized as heir to the throne and appealed to the Pope, who sided with her and had her brother Manuel recognized as the heir of her husband.
John II died on 25 October 1495; the hypothesis of poisoning was never ruled out.
After her brother Manuel I succeeded to the throne in 1495, Eleanor moved to the palace of Xabregas, where she hosted the royal court and continued to be socially active. For a short period between 1500 and 1502, Eleanor's brother Manuel found himself childless, and Eleanor herself became the heir to the throne. As she had no children, she declined to make the oath as an heir in favour of her sister Isabel.
Eleanor was extremely wealthy and used much of her money for charity. In 1498, she spearheaded the creation of the Santa Casa da Misericórdia as confraternities with humanitarian purposes, especially the care of the poor, the sick, and abandoned children. The original foundations survive today, and more have since been founded in other towns and cities of Portugal and in the Portuguese colonies.
Eleanor supported the foundation of the Hospital Real de Todos os Santos (All Saints Royal Hospital) in Lisbon, considered the best in contemporary Europe. She also founded the convent Madre de Deus (1509), considered a great architectural work, where she spent many of her later years, dressed almost as a nun.