I doubt the Union would not be able to survive a Maryland uprising. This would place the District of Columbia within Confederate territory. Pretty much Lincoln's worst nightmare, that.
After the riots in 1861, Baltimore was placed under martial law and it stayed that way until 1865. The cannons of Fort McHenry and Federal Hill were primed on civilian targets until the war was over, and there were always large numbers of Union troops moving through the city. The city didn't riot only once because they weren't that pro-Confederate - they rioted only once because they had guns pointing at them afterwards.
So yes, Baltimore did have the sentiment to rebel (although this of course wasn't uniform among all citizens), but the Union would do whatever it took to keep the city from doing so. It'd be far better to lose Missouri and Kentucky than Maryland.
In other words, Maryland stays in the Union pretty much no matter what.