This quote is uttered by Jem at the end of Chapter Five after he and Dill have been caught redhanded by Atticus trying to deliver a note to Boo Radley through a side window. Atticus tells them both off very firmly, listing a number of reasons why they should not bother Boo Radley any more. Lastly, he tricks Jem into admitting that he was trying to contact Boo Radley to make fun of him, using questioning techniques that make Jem confess without him realising he is doing so. Note how the chapter ends:
Jem decided there was no point in quibbling, and was silent. When Atticus went inside the house to retrieve a file he had forgotten to take to work that morning, Jem finally realized that he had been done in by the oldest lawyer's trick on record. He waited a respectful distance from the front steps, watched Atticus leave the house and walk toward town. When Atticus was out of earshot Jem yelled after him: "I thought I wanted to be a lawyer but I ain't so sure now!"
It is interesting to note that Jem waits until his father is "out of earshot," not wanting his father to hear his words. Clearly what he says comes straight after he realises how he has been tricked "by the oldest lawyer's trick on record," and as such, his pride is smarting as he realises how easily he was tricked and also how excellent a lawyer his father is. He has just learnt how difficult it is to conceal the truth from his father. He yells the line you quote as a sort of retaliation against his father. By momentarily rejecting being a lawyer, Jem is momentarily rejecting his father while he acts out of anger.