Twitter Inc. co-founder Biz Stone said he's rejoining the company six years after he left, becoming the second creator to return to help revive the struggling social media service.

In his new role, Mr. Stone will be focused on company culture, and he's not replacing another executive or filling a vacancy, he said Tuesday in a post on Medium. He was invited back to Twitter by CEO Jack Dorsey, another co-founder, who returned in 2015 after also stepping away for years. Twitter shares jumped on the news.

"It's important that everyone understands the whole story of Twitter and each of our roles in that story," Mr. Stone wrote. "I'll shape the experience internally so it's also felt outside the company."

Mr. Stone's presence could help boost morale at Twitter after several years of management turmoil and multiple rounds of job cuts. The San Francisco-based company has been fighting to reverse a slowdown in revenue growth and jump-start stagnant user numbers, and in September considered selling itself.

Mr. Stone left Twitter in 2011, long before its initial public offering. When Mr. Dorsey raised the idea of his return at a meeting with employees this year, people cheered, Mr. Stone wrote.

"The world needs Twitter, and it's here to stay," Mr. Stone wrote. "I'm so lucky that I get to step back in and help shape its future."

Mr. Dorsey, Mr. Stone and Ev Williams started Twitter in 2006. Two months ago, Mr. Stone sold his image-search startup, Jelly, to Pinterest Inc., becoming a special adviser at that company. He'll remain an adviser to Pinterest's product chief, Evan Sharp, Pinterest said in a statement.

Twitter shares climbed 2.8% to $19.76 at 1:49 p.m. in New York. They're up about 20% this year.