Gol D. Roger was the Pirate King, but he wasn't the only legendary pirate of his time. Kaido, Charlotte Linlin, and Shiki were all powerful equals to Roger. That being said, while Rocks D. Xebec was the most formidable foe he had ever faced, It was Edward Newgate, known as Whitebeard, who lived to become the greatest pirate of modern times.
The story of Whitebeard, the strongest man in the world, is one of the best in One Piece. From his humble beginnings, to his rise as the Emperor of the Sea, to his tragic death at Marineford, Whitebeard did everything for his family and friends, and destroyed anyone who tried to harm them.
Whitebeard became a pirate out of altruism
Edward Newgate was born with nothing

Related
Blackbeard's 10 Strongest Rivals in One Piece
Marshall D. Teach, otherwise known as Blackbeard, is the admiral of the Blackbeard Pirates and is one of the strongest characters in One Piece.
Edward Newgate was born in Sphinx, a poor town in the New World72 years before the events of A piece. There, Newgate grew up an orphan. Sphinx became increasingly destitute, to the point where he could no longer pay the Celestial Tribute and remain part of the World Government. Without the protection he once enjoyed, crime became rampant as people became desperate to survive. With no money to his name, no one to care for him, and nothing left to lose, a young Newgate decided he would support his country by becoming a pirate (and using the money and treasure he acquired to support Sphinx).
As Newgate learned the ways of piracy and aged into adulthood, his strength steadily increased. He learned to fight using a naginata and likely learned Haki during this time. Newgate's priorities also changed as, while continuing to fund Sphinx, he realized that his greatest dream was to have a family. It would take a long time, but this is a dream he would eventually realize.
Whitebeard trained to become the strongest man in the world
Whitebeard was Gol D. Roger's greatest rival

Related
The 20 Most Hated One Piece Characters, Ranked
One Piece is known for its lovable and endearing characters, but an anime with villains is bound to have some very unlikeable characters as well.
By his early 20s, Newgate was a well-known and infamous pirate, but not yet a captain. His strength was so infamous that he was invited to join the most powerful pirate crew ever, the Rocks Pirates, under Captain Rocks D. Xebec. Here, he first met Charlotte Linlin, a future Yonko, recruited another future Yonko into the crew, Kaido, and began to frequently discuss his independence and insubordination. It was during this time that Newgate presumably ate the Gura Gura no Mi. By eating one of the strongest Paramecia-type Devil Fruits in existence, Newgate gained the ability to create tremors, allowing him to cause earthquakes and tsunamis, with the suspicion that he could use the fruit's power to destroy the world. After over a decade, The Rocks Pirates met their end during the God Valley Incidentwhen they were defeated by the united power of Gol D. Roger, his crew, Monkey D. Garp and the Marines, all of whom were afraid of the danger posed by Rocks.
After the defeat of the Rock Pirates, Newgate renamed himself “Whitebeard” and eventually set out to build his own family in the form of his own pirate crew: the Whitebeard Pirates. Notable members of this crew throughout its history include Marco the Phoenix, who rose from Apprentice to Commander of the 1st Whitebeard Division, Portgas D. Ace, Commander of the 2nd Whitebeard Division, Gol D. Roger's biological son and Monkey D. Luffy's older brother, Kozuki Oden, the strongest samurai in Wano's history, and Inurashi and Nekomamushi, the future leaders of Zou. Taking only men into his crew, Whitebeard considered all who joined him as his own children, acting as a stern but loving father to them all. Along with his sons, Whitebeard eventually clashed with Roger and the Roger Pirates; The once-powerless orphan Sphinx was now able to fight on equal terms with the Pirate King for three days before a truce was called between the two.
Whitebeard's life changed forever after Roger's execution. With Whitebeard as the only man to ever fight on equal terms with him, he instantly became known as the strongest man in the world. This distinction earned him the status of one of the Four Emperors of the Sea, alongside Kaido, Big Mom, and later Shanks, along with a bounty of 5 billion and 46 million berries, the second highest of all time. The Great Age of Pirates began, and thousands of pirates began searching for the ultimate treasure left behind by Roger, the One Piece, but while Whitebeard was always seen as the closest to finding it, for many years he had no interest in doing so. His priority, as always, was simply enjoying time with his family, and it was only when he adopted Ace that he began hunting the One Piece in earnest, wanting to crown his new and beloved son as the new Pirate King. As his crew grew into a large force, Whitebeard was forced to divide it into 16 Divisions, each led by one of his strongest and most trusted sons. During this time, Whitebeard developed a cordial relationship with Shanks, demonstrated his heroism by claiming Fish-Man Island as his territory so anyone who tried to attack would know he was under his protection, and, as he grew older, became gravely ill.
Whitebeard died trying to save his son
It took all the might of the Marines to kill Whitebeard

Related
Vice Admiral Garp's Top 10 Strongest Rivals in One Piece
Monkey D. Garp is the legendary Navy Vice Admiral who fought the former Pirate King several times.
After building the family he always wanted, Whitebeard put his crew above all else. When the Whitebeard Pirates were betrayed by one of their own, Marshall D. Teach, who killed the Fourth Division Commander Thatch and stole the Yami Yami no Mi, Ace volunteered to hunt him down and make him pay. Whitebeard attempted to stop Ace from pursuing Teach, fearing the power he now possessed, but Ace persisted in his attempt. This quickly proved to be a big mistake, as Teach, now called Blackbeard, easily defeated Ace in their fight and handed him over to the World Government in exchange for being named Warlord of the Sea. With Ace set to be executed, Whitebeard rallied the entire fleet to join him in a war against the World Government at Marineford and to save his son before he was killed. Whitebeard received unexpected help in this fight from Luffy, who was also desperate to save Ace, and a motley crew of Impel Down prisoners he had brought with him; the two quickly developed a mutual respect.
Halfway through the war, Whitebeard was stabbed in the chest by one of his sons, Squard, who had been manipulated into thinking that he didn't care about him, but ever the kind father, Yonko forgave him. By far the strongest warrior on the battlefield, even in his sickly state, Whitebeard unleashed his wrath upon the Marines, inflicting severe damage to their forces and giving Luffy the opportunity he needed to free Ace from his Seastone shackles. However, this was not a battle Whitebeard would win. With not enough time to intervene, Whitebeard was unable to do anything as Admiral Akainu killed Ace. Enraged, Whitebeard battled Akainu and unleashed all of his remaining power. This overwhelming display nearly killed the Admiral, and would likely have succeeded, had their battle not been interrupted by the arrival of Blackbeard and his powerful crewmates from Impel Down. The traitor responsible for this bloody war would have been no problem for Whitebeard to defeat, but the new Blackbeard Pirates were a different story.
Physically and emotionally exhausted, severely injured, and with his illness worsening by the second, Whitebeard suffered a fatal blow from the combined attacks of the Blackbeard Pirates. Knowing that he was dying, Whitebeard refused to let this day be an absolute victory for the World Government. With cameras recording the war and broadcasting it around the world, Whitebeard gave one last speech and revealed to the world that One Piece was real. Before this moment, One Piece was nothing more than a myth, but with Whitebeard a known equal of Roger and thus a reliable source, this served as confirmation to every pirate and aspiring pirate that his treasure was out there, waiting to be found. By the time of his death, Whitebeard was the strongest man alive and one of the most endearing characters in A pieceHis importance to the series can be seen in his continued appearances in flashbacks, long after his death, with Blackbeard continuing to hold the stolen power of the Gura Gura no Mi and his untimely end being largely responsible for the shifts in power in the world after the time skip.