An unusual curse in Jeremiah 36:1-32 gives new insight into the virgin birth of Jesus.
Jehoiakim was a king of Israel. He angered God by burning a scroll that Jeremiah the prophet wrote. God cursed Jehoiakim by indicating that none of his children would sit on the throne of David (Jeremiah 36:29-31). And although Jehoiakim had children, scripture shows that none of them ever reigned as King David had.
Joseph, the father of Jesus, was one of Jehoiakim's descendants (through Jeconiah). Joseph's offspring could not claim David's throne because of the curse. Jesus laid claim to the throne of David (Luke 1:32, Acts 2:30, Hebrews 12:2). If Jesus had been born of Joseph, the curse would have been contradicted.
Also, God had promised David that one of his physical descendants would reign on the throne of his kingdom forever (2 Samuel 7:12-13). As explained above, Joseph was excluded from being the genetic father of the future king of Israel.
It was impossible to fulfill the requirements of both curse and promise by natural means. One man had to be both heir to and offspring of David, without being the genetic descendant of Jehoiakim. This problem required a divine solution.
God created a solution through the miracle of the virgin birth. Although Joseph was one of Jehoiakim's offspring (through Solomon), Mary was not. She was a descendant of Nathan, one of David's other sons (Luke 3:31). God's promise to David was fulfilled because Mary was the biological parent of Jesus.
The virgin birth also addressed the curse God had pronounced upon Jehoiakim. Kingship was an inherited right. By Joseph, Jesus inherited a legal claim to the throne of David. However, he was exempt from the curse of Jehoiakim because Joseph was not his genetic father.
So the miracle of the virgin birth accomplished God's will in two ways. First, it granted Jesus a legal claim to the throne of David. And second, it maintained the integrity of the curse God had pronounced upon Jehoiakim. Indeed, Jesus was not one of Jehoiakim's offspring.