Facebook has invested $1 million in CodePath.org, a nonprofit that provides computer science education to female and minority students at universities around the country.

The investment announcement comes one day after the company was publicly criticized by Mark Luckie, a former employee who said Facebook has "a black people problem."

"CodePath.org is doing something unique — by offering free, remote computer science courses that will serve from freshman to senior year," said Christian McIntire, Facebook's lead for computer science education initiatives, in a statement provided to CNBC. "They have the potential to help build one of the largest pipelines of high-performing, diverse software engineers for the industry."

Since launching its university program three years ago, CodePath.org has taught 1,700 students across 30 universities. The investment from Facebook will allow the organization to quadruple the number of students taught per semester, CodePath.org founder Michael Ellison wrote Wednesday.

CodePath.org's program is offered at schools with high diversity, Ellison said. Schools that offer CodePath.org's program include Jackson State University, Mississippi State and Texas A&M, Ellison said.

"The funding will also allow us to create courses that target underrepresented minorities and women during their freshman year and expand our number of college partners," Ellison wrote.

The courses are taught on campus over 12 weeks for academic credit, and afterward, students are matched with CodePath.org's internship partners, which includes Facebook, Ellison said. There is, however, a possibility that Facebook will not accept any CodePath.org students into internships, Facebook's McIntire told CNBC.

"It's not guaranteed. They have to earn that internship like anyone else," McIntire said. "We think the program will prepare students well to be competitive in that process."

Although CodePath.org is "an excellent program," this investment will not do anything to change the way those groups are treated once they are hired by Facebook, Luckie told CNBC in an interview Wednesday.

"Facebook needs to step up and talk about the things it's doing internally to create an inclusive space rather than just fixing the pipeline," Luckie said. "What my post called them out on is not being addressed so far, and the lack of response from non-black executives is very telling of the problems I outlined."

Ellison told CNBC that the timing of the announcement was purely coincidental and has been in the works for six months. Facebook has previously worked with CodePath.org to train its own employees and it has supported the organization's student program for years, he said.

"I see our close partnership as an opportunity to collaborate together to help set an example," Ellison said. "It's more important for organizations like ours to double down and work more closely so the people who are leading these organizations can benefit from our insight and our work on the ground."