The title was presumably created (no records of its earlier existence or grants) by King John IV of Portugal, the new monarch, first of the Braganza dynasty, sometime in the 1640s. It was firstly given to his eldest surviving daughter, Infanta Joanna of Portugal, 1st Princess of Beira. It was the King's intention that the male heir apparent would be Prince of Brazil and later also Duke of Braganza, whereas Princess of Beira was originally quite similar to that of French Madame Royale or the British Princess Royal. The title had no original connection to being one for next heirs of the throne - King John IV had a second son, and soon a third, but the daughter kept Beira and the boys received dukedoms (Braganza and Beja). However, Joanna died young in 1653.
Afterwards, the title kept being granted and regranted several times during the remaining Portuguese monarchy. However, the precedent of being granted to the monarch's eldest daughter in a situation where he had several living sons, was repeated sometimes in later centuries.
The title's first connection with the position of the heir was from 1669 onwards, when it was held by the Infanta Isabel Luísa, Princess of Beira (1669–90), the only then living child of King Peter II. She received it as the eldest daughter of the king, but as she also was the heiress presumptive until 1688, a new tradition got its groundwork.
Then, on December 17, 1734 the title was created anew by King John V of Portugal, in favour of his newborn eldest granddaughter Infanta Maria Francisca. She was the eldest daughter of the heir-apparent of the monarch. This was the first time when it was granted two generations down from the monarch. As the future Joseph I (the then Prince of Brazil) was to remain without sons, the new Princess of Beira would later become the proclaimed heiress and ultimately to ascend the throne.
In 1750 the newly ascended King Joseph I (believing that no sons would be forthcoming--indeed, his wife and he produced no further issue after 1746, as is known in hindsight) proclaimed his eldest daughter the official heiress and granted her the "crown-princely" title Princess of Brazil (but apparently not that Duke of Braganza). He in 1761 further granted Maria's eldest son, Infante Dom José Francisco (1761–88), the title Prince of Beira. For the first time, the title was held by a male.
This created a new tradition. The situation now, effectively, was that the king's official heir held the Princedom of Brazil, and Prince of Beira was Brazil's heir-apparent. The situation had been the same (though unintentionally) during 1734-50, when the monarch's heir-apparent was Prince of Brazil, and Brazil's obvious heir was Princess of Beira. This was to be repeated after that time, as monarchs granted Beira to the second heir-apparent whenever possible.
(The way the titles Duke of Braganza and Prince of Brazil were held is identical with the way the titles of Duke of Cornwall and of Rothesay are held in the UK. The male heir apparent received it when the relevant parent ascended the throne or, if the title was vacant, at birth. During the 1645-1822 period, the Prince of Brazil always belonged to the heir apparent to the throne, who also received the title Duke of Braganza. In 1750 though, Brazil--but not Braganza--was specifically granted to the female heiress, as she was proclaimed the official successor.)
The future King John VI himself never became Prince of Beira--he became Prince of Brazil and Duke of Braganza directly at the death of his elder brother.
According to the first tradition, the next holder of Beira would be Infanta Mariana Vitória of Portugal (1768–88), the eldest daughter of Maria I and Pedro III. She died two months after her eldest brother. In 1785, she was married to Infante Gabriel of Spain (1752–88), whom she predeceased by some weeks. Their three children were granted Infantes of Portugal in addition to that of Spain by their grandmother. The others going having died, the eldest son, Infante Pedro Carlos of Spain and Portugal (1786–1812) married his Portuguese cousin Teresa, Princess of Beira, and left issue (see below).
Queen Maria I and her regent, the future King John VI, granted the Beira in turn to John's heirs-apparent, and the second of them, Infante Dom Pedro Francisco survived to become in 1816 the Prince of Brazil, the last Portuguese heir-apparent to hold that title (as he himself later made Brazil independent).
In the second tradition, when born in 1821, the then Prince of Brazil's eldest son João Carlos was granted Beira in 1821 after birth, he being the third in the heir-apparent line, but he died the following year, some months before Brazil's secession. Emperor Pedro's next son, born in 1825, received no title from Portugal.
According to the first tradition, the next holder would be Infanta Maria da Glória Joana (1819–53), the eldest daughter of King Pedro IV. She, however, ascended the throne in 1826 as Queen Maria II.
The second tradition-based need arose only in 1887, when Infante Dom Luís Filipe was born in the last years of his grandfather King Luís I's reign. Luís Filipe was Prince of Beira 1887-89 and then succeeded his own father, the new king, as crown prince, becoming 21st Duke of Braganza.