The pilot stores for the profit-sharing program, which Starbucks hopes to expand, are in Harlem and in Los Angeles' Crenshaw district.
Partner non-profit groups in those neighborhoods each will receive at least $100,000 in the first year, the company said.
The announcement from the world's biggest coffee chain comes a day after Chief Executive Howard Schultz unveiled Create Jobs for USA, a funding partnership that will provide affordable loans for small businesses, non-profit groups and commercial real estate and affordable housing projects in distressed communities.
Schultz caused a stir this summer, when he called on business leaders to step up hiring and to boycott political giving until the president and members of Congress reached a deal on U.S. debt, revenue and spending.
Schultz, billionaire investor Warren Buffett and GE
We are going to have to understand that for there to be shared prosperity, there has to be shared success and shared sacrifice, he said.
The CEO, who built one of the world's most recognized brands, said his newest community-building project is personal: He grew up in federally subsidized housing in Brooklyn.
Abyssinian Development Corp (ADC), which offers a wide selection of community services, is Starbucks' partner in Harlem.
If you don't have education and development opportunities for young people, your neighborhood is going to die within a couple of generations, Sheena Wright, the group's president and CEO told Reuters.
The profit-sharing program could create much-needed new revenue streams for non-profits, said Blair Hamilton Taylor, who leads the Los Angeles Urban League -- Starbucks partner in Crenshaw.
Taylor began working with Schultz after Starbucks shuttered one if its Crenshaw stores during the company's restructuring in 2008 and 2009.
It's not going to be a million dollars a year, Taylor said of the new program.
But if McDonald's decides to do this next week, and then Wendy's decides to do it, and Burger King decides -- now all of the sudden you do have a million dollars, he said. My hope is that is what this triggers.
(Reporting by Lisa Baertlein; editing by Carol Bishopric