Yes, Queen Elizabeth II is indeed related to Mary, Queen of Scots. The connection between them stems from their shared lineage.
Mary, Queen of Scots, was a great-granddaughter of Henry VII of England. This makes her a cousin to the Tudor line, from which Elizabeth II is descended. Specifically, Elizabeth II is a direct descendant of Henry VII through his daughter, Mary Tudor, who was married to Louis XII of France. This lineage places both queens under the extensive family tree of the Tudor dynasty.
Moreover, the relationship is further complicated by the fact that both queens were great-nieces of Henry VIII of England, who was a significant figure in their family history. The intertwining of royal families over generations often leads to complex connections, but in this case, they are indeed related.