John Rich, who directed All in the Family for the first four seasons, has a long passage in his autobiography "Warm Up the Snake" about how Evans was cast as Lionel. He was looking for someone who would be able to tell Archie off, and be subtly sarcastic to Archie, without ever seeming "threatening" or unsympathetic. None of the experienced actors seemed to be right for the part, but Rich found Evans -- who had almost no acting experience and wasn't very good at his audition -- and realized that he was exactly right for the part. Even though Evans' readings for the part were disappointing, Rich convinced Norman Lear to let him cast Evans in the role, and worked hard on improving his acting skills. It paid off: Evans was great in the very first episode, and Lionel's relationship with Archie was one of the key relationships on the show for those first four years.
Evans's Lionel Jefferson was sort of a more sympathetic alternative to Rob Reiner's Meathead. Like Mike, Lionel was liberal and disgusted by Archie's bigotry. But unlike the self-righteous Mike, Lionel understood that Archie was basically a good man who was parroting the prejudices he'd been taught from an early age. (In one episode Lionel admits that in some ways he objects more to Mike's condescending attitude to race issues; he can handle Archie, he explains, because "he [Archie] doesn't know any better.") Lionel corrected Archie, made fun of him, and showed him up, but he also treated Archie, as a person, with respect, even as he rightly showed no respect to Archie's bigotry. The first time Lionel ever got angry at Archie was in a third-season episode when Archie objected to his niece dating Lionel. In the climactic scene from that episode, Lionel tells Archie that he's gone too far, and calls him by his first name for the first time in the series:
ARCHIE: I'm saying youse guys oughtta stick with youselves.
LIONEL: You mean guys oughtta stay with guys?
ARCHIE: You know what I'm talking about, Lionel. I'm saying that whites oughtta stay with whites and coloreds oughtta stay with coloreds.
LIONEL: Look, Mr. Bunker, it's been a year and a half now since we moved into this neighborhood. I was just nineteen, and I got a big kick out of you and me for a long time. But I'm pushing twenty-one now, and I'm not getting that big a kick out of it anymore.
ARCHIE: Put a lid on it, Lionel --
LIONEL: I'm not finished. Now, we've been friends and we can go on being friends. But when it comes to black and white and all the other wonderful thoughts you have in between, put a lid on that, Archie!
Because he'd co-created Good Times, Evans wasn't available to play Lionel on The Jeffersons; he was replaced by Damon Evans (no relation). He returned to the role after Good Times was canceled. But the character of Lionel was never quite as good as he was when playing off Archie Bunker; it was that relationship, and the interplay between Carroll O'Connor and Mike Evans, that made for some of the best scenes in the first four years of All in the Family.