History according to chess.com/chessopedia

The queen was originally the counsellor or prime minister or vizier (Sanskrit mantri, Persian farzīn, Arabic firzān or firz). Initially it could move only one square diagonally. About 1300 its move was enhanced to allow it to move two squares with jump onto a same-colored square for its first move, to help the sides to come into contact sooner.

The fers changed into the queen over time. The first surviving mention of this piece as a queen or similar was "regina" in the Einsiedeln Poem, written in Latin around 997 and preserved in a monastery at Einsiedeln in Switzerland. Some surviving early medieval pieces depict the piece as a queen, and the word fers became grammatically feminized in several languages, for example alferza in Spanish and fierce or fierge in French, before it was replaced with names such as reine or dame (lady). The Carmina Burana also refer to the queen as femina (woman) and coniunx (spouse), and the name Amazon has sometimes been seen.

In Russian it keeps its Persian name of ferz to this day; koroleva (queen) is colloquial and is never used by professional chess players. However, the names korolevna (king's daughter), tsaritsa (tsar's wife), and baba (old woman) are attested as early as 1694. In Arabic countries the queen remains termed, and in some cases depicted as, a vizier.

Historian Marilyn Yalom proposes that the prominence of medieval queens such as Eleanor of Aquitaine and Blanche of Castile and Isabella I of Castile, the cult of the Virgin Mary, and the power ascribed to women in the troubadour tradition of courtly love, might have been partly responsible for influencing the piece towards its identity as a queen and later its modern great power on the board, as might the medieval popularity of chess as a game particularly suitable for women to play on equal terms with men. She points to medieval poetry depicting the Virgin as the chess-queen of God or Fierce Dieu. Significantly, the earliest surviving treatise to describe the modern movement of the queen (as well as the bishop and pawn), Repetición de amores e arte de axedres con CL iuegos de partido (Discourses on Love and the Art of Chess with 150 Problems) by Luis Ramírez de Lucena, was published during the reign of Isabella I of Castile. Well before the queen's powers expanded, it was already being romantically described as essential to the king's survival, so that when the queen was lost, there was nothing more of value on the board.

Marilyn Yalom wrote that:

The chess queen, rather than ferz or similar, is known of in what is now Spain and Portugal only from the 12th century, but started sooner elsewhere.

The modern move of the Queen started in Spain during Isabella I's reign, perhaps inspired by her great political power, and spread from there, perhaps being spread by the invention of printing and the 1492 Expulsion from Spain of the Jews who carried the new chess rule with them as they fled.

During the 16th century the queen's move took its modern form as a combination of the move of the rook and the current move of the bishop. Starting from Spain, this new version - called "queen's chess" (scacchi de la donna), or pejoratively "madwoman's chess" (scacchi alla rabiosa) - spread throughout Europe rapidly, partly due to the advent of the printing press and the popularity of new books on chess.
The new rules faced a misogynistic backlash in some quarters, ranging from anxiety over a powerful female warrior figure to frank abuse against women in general.

At various times, the ability of pawns to be queened was restricted while the original queen was still on the board, so as not to cause scandal by providing the king with more than one queen. An early twelfth-century Latin poem refers to a queened pawn as a ferzia, as opposed to the original queen or regina, to account for this.

In Russia for a long time the queen could also move like a knight; some players disapproved of this ability to "gallop like the horse" (= knight). The book A History of Chess by H.J.R.Murray, page 384, says that a Mr.Coxe who was in Russia in 1772 saw chess played with the queen also moving like a knight.