Lincoln didn't want Maryland to secede because Washington would be surrounded by the Confederacy.
The first state to secede from the Union was South Carolina. That did not immediately cause a war. Congress didn't know if other states would follow. When they did, the new Confederacy felt strong enough to fire on a U.S. Army base on a small island in Charleston Harbour. After that, Lincoln called for volunteer troops. And the war was on.
Abraham Lincoln suspended Habeas Corpus at the beginning of the Civil War. Since Maryland was a border state and close to Washington, DC, authorities would have able to arrest anyone who attempted to cause the state to secede from the Union. Lincoln sent Federal troops to Maryland. He made it clear that Maryland should not leave the Union. Although there were many people in Maryland who wanted to join the South, there was not enough to bring the state into the Confederacy.
They seceded from the USA, because they knew that Lincoln would not allow any new slavestates. They began to take steps to secede from the Union.
The south believed that President Lincoln was an abolitionist. They were afraid that Lincoln would outlaw slavery and seceded in anticipation of slavery being outlawed.
Maryland held a secession convention but they did not vote to secede. Delaware did not hold a convention because their legislature voted unanimously not to. Additionally, President Lincoln threated Maryland with US army forces and also suspended habeas corpus. This intimidated the state and terrified its citizens. For all practical purposes, Lincoln could not afford to have Maryland secede. If it did the City of Washington DC would be surrounded by Confederate states. Then the Union's capital would have to be moved to another Northern city.
The people of Maryland had a long tradition of slave-holding and ties to the south. They wanted to secede from the Union, but President Lincoln would not allow it. Maryland surrounded the capital of the US on three sides and if they seceded, the capital would have to secede also.
In a practical sense, a state cannot secede. I have heard it said that a state would need the permission of the other 49 states to secede. In theory, 75% of the states could ratify a constitutional amendment allowing - say - California to secede. That amendment would be the supremem law of the land, and no federal action contrary to the amendment would be allowed.
South Carolina on April 12, 1861 they attacked Ft. Sumter in Charleston harbor that was a union site. The southern states thought that Lincoln would declare slavery illegal and they felt they had the right to decide the issue for themselves. It was a States rights issue.
They would secede from the United States and form the Confederate States of America.
They were the first state to secede. After Sherman had finished with them, and then they were brought back into the Union, I don't think they would call it a success.
There was a chance that it would join the Confederacy, because it was a deeply divided state, and its leaders were Southern sympathisers. Lincoln acted promptly (and illegally) to jail those leaders, and the danger of a Confederate state surrounding Washington was averted.