Marina Keegan, a journalist and playwright who won national attention for urging her fellow college students to resist the lure of Wall Street, died in a car crash Saturday afternoon in Dennis, Mass., just days after graduating from Yale. She was 22.

Ms. Keegan was riding in a car driven by her boyfriend, Michael Gocksch, a fellow Yale graduate, when it rolled over. She was pronounced dead at the scene; Mr. Gocksch was not seriously injured.

Ms. Keegan was to start working as an assistant at The New Yorker magazine in June. A musical she wrote with two other students, “Independents,” is to be performed at the New York International Fringe Festival this summer.

At Yale, Ms. Keegan helped organize a protest challenging campus recruiting, known as Occupy Morgan Stanley. Students gathered outside the hotel where Morgan Stanley was holding an information session, chanting slogans like “Take a stance, don’t go into finance.”