The new President, Andrew Johnson, ordered the lifting of the blockade of ports in the South in June 1865. The very last remnants of those who fought on after the formal surrender in April 1865, finally gave up and were allowed to disperse.
General E Kirby Smith surrendered all Confederate forces to the west of the Mississippi. The last sizeable Confederate army was allowed to disperse.
The blockade of all Southern ports was lifted by President Johnson. The blockade had been a huge success as it starved the South of a great many things they needed to fight the war. By 1865, 470 Union warships patrolled the eastern coastline and any blockade runner had very little chance of getting in to or out of a Southern port.
"American Civil War June 1865". HistoryLearningSite.co.uk. 2014. Web.