Had Kerry-D won the 2004 Presidential Election (OH).
Markey-D would be the Democratic candidate along with Meehan-D
Markey-D would be the nominee for the 2005/2006 Special and would have defeated Malone-R in the General Election.
When Kennedy-D seat became vacant in 2009/2010. Markey-D sat it out. Capuano-D ran and newly elected AG Coakley ran, Coakley won the primary but lost the general to Brown-R.
When Brown-R faced re-election in 2012- Markey and Capuano and Coakley and Patrick said not, Democrats recruited Warren-D. Warren-D sucessfuly unseated Brown-R.
You have no basis and provide no evidence for assuming 1) Markey wanted to run for Senate eight years ago; 2) who his Primary opponent would have been or 3) who the Republican would have been if he was running.
Ed Markey actually pulled papers to run against John Kerry, Jimmy Shannon, Mike Harrington. At the last minute, he realized he could not win and decided to run for his House seat. The others stayed in, Kerry won and 29years later, he has another shot
Ed Markey was smart enough to stay in the US House- build 37 years seniority before running for the US Senate.
Markey-D is favored to win the Democratic Primary over Lynch-D.
Republican challengers are either Sean Bielet or Mike Sullivan-R
Jack E Robinson running as an Independent and the Libertarian candidate makes the race easier for Markey.