Therefore wrong-doing cannot be conceived of, but under dominion --that is, where, by the general right of the whole dominion, it is decided what is good and what evil... Obedience is the constant will to execute that, which by law is good, and by the general decree ought to be done.
Yet we are accustomed to call that also wrong, which is done against the sentence of sound reason, and to give the name of obedience to the constant will to moderate the appetite. [If I thought that] human liberty consisted in the licence of appetite, and slavery in the dominion of reason. But as human liberty is the greater, the more man can be guided by reason, and moderate his appetite, we cannot without great impropriety call a rational life obedience, and give the name of wrong-doing to that which is, in fact, a weakness of the mind, not a licence of the mind directed against itself, and for which a man may be called a slave, rather than free.
Unpacking Spinoza's meaning – Often good and evil are defined by the governing authority and agreed to by the general population. Yet sometimes a thing is called wrong by the authority even when reason would not do so. (Perhaps Spinoza was thinking of a book condemned and burned because its ideas differed from the established view.)
Common practice and public acceptance is given to the idea that men must be confined by law to curb their emotions (appetites). Spinoza says that if freedom consisted of men doing everything they desired to do without restriction then the restrictions imposed by reason and reasonable laws might be seen as slavery. But he knows that the more a man is governed by reason and the more he restrains his emotions the more freedom he has. Doing whatever one wants is not freedom but is a weakness of the mind wherein men are slaves to their emotions.