Hello Shen,
"for good" means forever .
It means here Whitman left school for ever at the age of 11 and never went back to it to pursue his studies. Instead he worked as an office boy.
It doesn't mean leaving to seek his fortune, on the contrary he was forced to leave , because he needed to work at this early age and was not fortunate enough to continue hi schooling as many other boys his age.