The survey, from the MassINC polling group, gives Markey 43 percent support to Brown's 38 percent support among Massachusetts residents. That's a reversal of Brown's fortunes from December 2012, when he led Markey by 18 percentage points.
Still, 19 percent of voters say they don't know who they'd vote for.
Brown still maintains high popularity, with 45 percent viewing him favorably to the 29 percent who view him unfavorably. Thirty-six percent say they view Markey favorably to 29 percent who view him unfavorably, largely due to the fact that he's still relatively unknown.
The former senator is thought to be mulling another Senate bid, or possibly a run for governor in 2014. He's also rumored to be looking at a run for Senate in New Hampshire.
Massachusetts is historically a blue-leaning state, however, and Markey trounced his Republican opponent in the special election that brought him to the Senate. Many political observers believe Brown would have an easier time in the gubernatorial race in 2014.
MassINC surveyed 500 Massachusetts residents statewide from July 17-20 and has a margin of error of plus or minus 4.4 percentage points.