Matthew Weiner, the creator, writer, producer and occasional director of “Mad Men,” paid no heed to the old showbiz adage: “Never work with children or animals.” And it’s a good thing. Otherwise, television audiences would have missed out on the astonishing transformation of Sally Draper, the character played by the actress Kiernan Shipka, from an adorable girl of 6 with a few cameo scenes to one of the most compelling characters and acclaimed actors on the show.  “Mad Men” returns to AMC next Sunday for the final seven episodes of its seven-season run. In anticipation of that farewell, Mr. Weiner, 49, the winner of nine Emmy Awards — seven for “Mad Men,” including four consecutive awards for best drama series, and two for his work as a writer and producer on “The Sopranos” — invited Ms. Shipka, now 15, and The New York Times to lunch at his home in Hollywood.  Sitting poolside at the 1920s Spanish Colonial that Mr. Weiner’s wife, Linda Brettler, an architect, finished renovating three years ago, he and Ms. Shipka discussed the complexity of working with and as a child actor; the show’s increased focus on Sally Draper, thanks to Ms. Shipka’s acting chops; and life after “Mad Men.”  Philip Galanes: When people talked about how revolutionary the film “Boyhood” was — filming a child actor over many years — did you ever think, “What about Sally Draper?”  Matthew Weiner: No, I loved that movie. But I was on a similar path with Kiernan, in the sense that you’re always gambling with a child actor. I had no right to hope she’d turn out this beautiful. But you never know how a 6-year-old is going to develop. Will they become self-conscious in front of the camera or lose interest? But Kiernan is a prodigy. You are.  PG: Do you remember auditioning for the show?  Kiernan Shipka: I feel so lucky because I remember all of it. There were two auditions. And it was a pretty brief scene. I did it twice — with just a little variation.  PG: You were doing variations at 6?  MW: She came in and knew the lines cold. Could you even remember your phone number at that age? So, I had her do the scene again, just to see if she could. I also give kids a series of instructions, like, ‘Walk to this spot, say the line, then walk over there and sit down.’ If they can do them in order, without freaking out, you’re 50 percent there.  KS: It’s so interesting to hear this now.  MW: Then you start looking at the performance. And I don’t want to embarrass you, but Kiernan had the cutest lisp in the entire world.  PG: People were awfully sad when you grew out of that lisp.  MW: She felt like a real kid; she wasn’t pushing it. But the extra step I do is meeting the parents. That’s how you find out if the kid wants to do it, or the parents do. And from the minute I met Erin [Kiernan’s mother], I knew that this was no show pony. Kiernan was an actress and so poised and — I hate to say it — a freak.  KS (laughing): Why, thank you.  PG: When did you first start working?  KS: Pretty much as a baby. I’m from Chicago and started doing commercials there when I was 5 months old. It’s always something I was doing.  PG: So, it wasn’t your choice initially. Have you ever thought, “Gymboree might have been nice”?  KS: No! I’m so glad it happened the way it did. Obviously, I started when I was very, very young. But when I got older, and actually started acting, I loved it. And that’s why I stuck with it.  MW: Modeling or being in the background can be fun. You get money and attention and people telling you how beautiful your kid is. But it’s a big leap from there to performing. From the moment Kiernan was on set, Jon [Hamm] and January [Jones], who were in all the scenes with her, were like, “Who is this kid?” So talented.  PG: Still, the relationship between you must be complex: quasi-parental, but also boss and employee.  MW: In the deep psychological version of life, everyone has a parental relationship with their boss, especially if you create the character they play. But Kiernan is the only actor on set I had a parental relationship with. I have four boys, but no little girls. I always wanted to portray Sally honestly, but I’m extremely protective of Kiernan — of her growing up, her costumes. Everyone is. But I’m also the boss, and in the end, the show always wins.  PG: Sally has had a lot of provocative material. How do you handle that with a child actor?  MW: Every season, I have a meeting with Kiernan’s mom, in person, and I tell her all of the things that are going to happen with Sally. And she knows I’m asking if it’s O.K.  PG: Did she ever veto anything?  KS: Then my mom would relay the message to me. And I’d get so excited.  MW: Once, pretty deep in, Erin told me that Kiernan said, “Don’t say no to anything!”  KS: It’s true. I know Matthew is going to give me great stuff.  PG: One of your most memorable moments is Sally’s sleepover at a friend’s house. She’s watching TV and starts masturbating to an actor on “The Man From U.N.C.L.E.” The friend’s mother catches her and sends Sally home to her mother, who is furious.  MW: We don’t have to talk about this. Are you O.K.?  KS: I’m fine with it.  PG: That, alone, is impressive. By the time we’re 40, we know that everyone gets caught in awkward situations. But childhood is isolating. And you were only 9 or 10 when you did that scene. How did you work on it?  MW: I told Erin about it. We always strived not to make Sally a fake TV kid. And the strange thing is, if this were a boy, nobody would care. So, the groundbreaking thing was to show that little girls have sexual feelings, too.  KS: I was very in the world of Sally when we shot that scene. I knew that her mother was really ashamed of what she’d done, and I played off that.  MW: That was why we wanted to tell the story, because her mother thought it was so dirty.  PG: But was it hard to keep that in mind when your TV mom is threatening to chop off your fingers?  KS: I like challenges. And January is such an amazing actress and great counterpart. I just remember trying to get deep into Sally’s world, into her groove, and hang onto it through the scene.  MW: I told you, she’s a rare commodity. Kiernan always understood the material, and we never had to hold back. Or worry how long a scene was, or how emotional. I had such big plans for her.  MW: Right away. My biggest plan was that, one day, the only people who wouldn’t know who Don Draper was would be his kids. I’d been working toward that since the beginning.  PG: And you got there. Perhaps the finest moment in the show is between Kiernan and Jon Hamm, when he takes his kids to see the brothel he grew up in — this run-down house in this run-down place.  MW: The funny thing? That was probably my most insecure moment on set, ever. I wanted it to be visual. Don and his three kids standing in front of the house where he grew up. I saw it like an album cover. And Kiernan and John exchange this look, like she’s asking, “Why are you showing me this?” And he’s saying, “I’ve lied to you, and I’m ashamed of that.” And she gets it — all in that moment.  PG: The major achievement of “Mad Men” is the way you’ve mined the secret shame we all have, and that keeps us isolated. Is that your story?  MW: Absolutely! Everyone would like to have one look like that from their dad. And I don’t know that I’ve had that moment with any person. I don’t think most of us do. I’m a little bit of what Tony Soprano would call “a miserable.” I know my blessings, and I’m too superstitious to list them. But we’re all alone. And we all have a fake identity, right? Inauspicious roots. No amount of good things can take away how we feel. So, I wanted the close moments — like the look between Sally and Don — not to be phony, the way TV moments often are.  PG: Was it rough to watch the show as a little girl?  KS: I wasn’t allowed to watch at the beginning. I just watched my scenes. I was superfocused on Sally and her story line. But I didn’t go to table reads or anything.  MW: I didn’t want her sitting through a lot of adult conversation or situations. I didn’t let my kids watch the show, either. Even in filming, Sally sees a lot of things that Kiernan didn’t see, if that makes sense. We might have told her the gist of what was going on, but I didn’t want to put her on camera when she might be embarrassed. We did reaction shots.  KS: It wasn’t until much later that I went back and watched the whole series.  PG: How did you decide the time was right?  KS: Um, I was sick. And Netflix existed.  MW: Just like a million other people found the show.  KS: And it was really a treat to go back and relive those days.  PG: Have you watched “The Sopranos”?  KS: I have. It’s so cool to think of Matt writing there.  MW: I can’t believe I did.  PG: I read a funny crack you made: “I was the first female writer on ‘The Sopranos.’ ”  MW: I didn’t say that. Someone said it about me. I hope it’s not insulting to Robin Green, who worked on “The Sopranos” from the beginning. But she was way better at writing brutal violence than I was. It was meant as a joke that I have a certain sensitivity. I was better on the softer side of things.  PG: Let’s talk about aesthetics. Were you surprised that the early fascination with “Mad Men” centered on the midcentury sets and costumes?  MW: It was part of the pitch. I’m from the ’80s, and my high school years were obsessed with this period. [He points to period drinking glasses on the table.] I had these before the show. That’s how obsessed I was. I told the network: There’s a little bit of porn in this. And not just eating steaks and drinking and smoking with impunity. This was a high point for American design and American acceptance of design. The trick was to make it feel real — not museum-quality.  PG: There was even an aesthetic spillover onto you, Kiernan. For a while, every magazine seemed to want “A Peek Inside Kiernan’s Closet.”  KS: It’s true. I was really interested in fashion at the time, which was completely thanks to Janie Bryant, our costume designer. She always talked about telling stories through clothes, and I thought that was cool.  PG: Lately, I’ve read a spate of articles saying that “Mad Men” is really all about Sally.  MW: From the beginning, I said, This show is seen through the eyes of a child — because I was a child. You’re looking behind your parents’ bedroom door. And now, Sally’s adulthood has hit them in the face. They’re looking at someone they saw as a kid and remembering the things they saw through her eyes. Confusing things and pieced-together things. They’re starting to feel insight and not just experience.  PG: Do you ever take stock of your parents’ marriage that way, Kiernan?  KS: We’re all products of our environment. So, of course I watch my parents. But Sally and I are very different people, growing up at very different times. And my family is a lot happier than hers. But I admire her a lot, and I adore having her in my life.  PG: What’s your emotional state, on the eve of the final episodes?  KS: I’ve been on the show for more of my life than I haven’t. It hasn’t settled in yet that it’s over. It feels more like we’re on hiatus. I’m so grateful that the new episodes are coming.  MW: I’m dying for people to see them. But when I moved out of my office in December, I was shocked by how sad I was, about the passage of time and the mortal aspect of completing something that was so important to me. Plus, the scattering of all these talented people.  PG: Are people cruel enough to say “What’s next?” yet?  MW: Every day! My kids ask me now as a joke.  PG: Are you feeling like a rest?  MW: She can say whatever she wants, but this one’s been working constantly.  PG: Has “Mad Men” ruined you for sitcoms?  KS: Oh, I don’t think of it that way. The show made me fall in love with characters, flawed ones, that are real and have voices.  MW: Kiernan is a kindred spirit to a lot of us who work on the show. We have a desire to make something out of the feelings we have. We were lucky we got to do that. You practically never do.  This interview has been edited and condensed.  A version of this article appears in print on March 29, 2015, on page ST1 of the New York edition with the headline: See Sally Grow Up. Order Reprints| Today's Paper|Subscribe
The show’s creator and the child star who transformed into an acclaimed young actress discuss the show, the role and the future.