I used to think that this was just one of those unexplained puzzles in the movie and the viewer needs to decide for him/herself its significance and meaning.
I do not really want to go along with the theory that everything after 1933 was an opium induced dream but the smile did seem to fit well with that theory. Noodles dreams of his past and his opium enhanced imagination conjures up that Max engineered the whole thing to pursue a lucrative career on his own. There is of course the deaths of his friends - but this was probably down to Max - and the rape of Deborah but in his imagination he has met her in the future and whilst she is a bit cold towards him, she is still on speaking terms with him and optimistically things may get better. His conscience is clear and he can smile again.
However after viewing the scenes again and looking at Noodles clothes and tie, this is total rubbish. Chronologically the ending smile comes before the scenes in the opium den at the beginning of the film. Noodles has seen the devastation caused to his friends by his betrayal and goes to the opium den to seek solace. He loosens his tie, lies down on the cot and initially the opium pipe brings relief and he smiles, as depicted at the end of the film. However gangsters enter the theater looking for him, the chinaman brings him an infusion to wake him up and coming round from the effects of the opium he remembers the deaths of his friends.
My own interpretation of the smile is that it doesn't have a significant meaning or link to other parts of the movie. Noodles lies down, inhales the opium and almost immediately the smile comes. There is insufficient time for him to recall past or future events and smile. It is a stupid smile, down to the effects of the opium bringing him temporary relief from conscious awareness. The main link is to a similar scene of Jill in Once Upon a Time In The West.
However it's a great touch - the ending coming before the beginning.
mal247: I'm with you 100 per cent on this one. I think many fans are just reading too much into that scene, with the dream sequnce theory and all that other stuff. I agree with you that Noodles is simply making a dopey smile because the opium has given him a very brief respite from reality. The film maker seems to be saying to us that this is going to be the last moment, for at least the next 35 years, that Noodles will have any degree of inner peace, even if it that peace is drug-induced and very temporary.
The irony is that Noodles doesn't know it yet, but of course we do. We've already seen that once he leaves the opium den, he'll be shocked back into reality. He'll find out that his world has been torn apart even worse than he thought. He's already found out, from the newspaper given to him in the opium den, that his best friends and partners are dead because he ratted them out to the cops (or at least that's what he will believe for the next 35 years). But in a few minutes he'll also find out that at that very moment he's being hunted down by hit men, that those same hit men have already killed his girlfriend and beaten his one remaining friend (Fat Moe) within an inch of his life, and that all his money has mysteriously disappeared from the locker. As a result, he leaves town a completely broken and utterly devastated man, to go into self-imposed exile.
The use of irony shows in the timing of the smile scene--it comes at the very end of the film, just after Noodles at last finds some peace after 35 years. Of course, he's still lost everything that was important to him. But after the scene with Secretary Bailey/Max, he can at least have some small degree of peace, knowing that the destruction of his world was not completely his own doing. After all these years, he learns the truth, that he was not responsbile for the deaths of Max, Patsy and Cockeye. Of course, this is a bittersweet revelation for him, since he has lost 35 years of his life while being tortured with the thought that he was at fault:
Bailey/Max: I'm already a dead man. At least give me a chance to settle the debt that I owe to you . . . I found out where you were. I brought you back here for this. To even the score between you and me.
Noodles: I don't know what you're talking about, Mr. Bailey. You don't owe me a thing.
Bailey/Max: Your eyes were too full of tears to see it wasn't me lying there burned up on that street. It was somebody else. You were too shocked to realize that the cops were in on it, too. That was a syndicate operation, Noodles.
Noodles: You're crazy.
Bailey/Max: You said that to me once before, a long time ago. But my mind was never as clear as it was at that moment. I took away your whole life from you. I've been living in your place. I took everything. I took your money. I took your girl. All I left for you was 35 years of grief over having killed me. Now, why don't you shoot?