Enough has been pointed out that I regard the point as having been made. Lincoln had the Authority under the Constitution to suspend Habeas Corpus in case of Rebellion, and what was happening in Baltimore could fairly be called a Rebellion.
It still doesn't explain why he suspended it in all the other states later. Was the entire Union in rebellion too?
Lincoln's suspension of habeas corpus in April 1861 was limited to the Baltimore area alone, where the unrest was occurring. Link
Later, wider suspensions of habeas corpus came later after the congressional vote. And as the Supreme Court ruled in 1865 in many cases the suspension was not warranted.