HASTINGS, Neb.—The Clinton Global Initiative, which arranges donations to help solve the world’s problems, set up a financial commitment that benefited a for-profit company part-owned by people with ties to the Clintons, including a current and a former Democratic official and a close friend of former President Bill Clinton.

The $2 million commitment was placed on the agenda for a September 2010 conference of the Clinton Global Initiative at Mr. Clinton’s urging, according to a document from the period and people familiar with the matter.

Mr. Clinton also personally endorsed the company, Energy Pioneer Solutions Inc., to then-Energy Secretary Steven Chu for a federal grant that year, said people with knowledge of the endorsement.

The company, whose business plan was to insulate people’s homes and let them pay via their utility bills, received an $812,000 Energy Department grant. Mr. Chu, now a professor at Stanford University, said he didn’t remember the conversation.

The Clinton Global Initiative is a program of the Bill, Hillary and Chelsea Clinton Foundation. The foundation has been a focus of criticism this political season over donations received from governments and corporations that had business before Mrs. Clinton when she was secretary of state and that could be affected by decisions she would make as president. The foundation has said it “has strong donor integrity and transparency practices.”

The Clinton Global Initiative’s help for a for-profit company part-owned by Clinton friends poses a different issue. Under federal law, tax-exempt charitable organizations aren’t supposed to act in anyone’s private interest but instead in the public interest, on broad issues such as education or poverty.

“The organization must not be organized or operated for the benefit of private interests,” the Internal Revenue Service says on its website.

Energy Pioneer Solutions was founded in 2009 by Scott Kleeb, a Democrat who twice ran for Congress from Nebraska. An internal document from that year showed it as owned 29% by Mr. Kleeb; 29% by Jane Eckert, the owner of an art gallery in Pine Plains, N.Y.; and 29% by Julie Tauber McMahon of Chappaqua, N.Y., a close friend of Mr. Clinton, who also lives in Chappaqua.

Owning 5% each were Democratic National Committee treasurer Andrew Tobias and Mark Weiner, a supplier to political campaigns and former Rhode Island Democratic chairman, both longtime friends of the Clintons.

The Clinton Global Initiative holds an annual conference at which it announces monetary commitments from corporations, individuals or nonprofit organizations to address global challenges—commitments on which it has acted in a matchmaking role. Typically, the commitments go to charities and nongovernmental organizations. The commitment to Energy Pioneer Solutions was atypical because it originated from a private individual who was making a personal financial investment in a for-profit company.

Asked about the commitment, foundation officials said, “President Clinton has forged an amazing universe of relationships and friendships throughout his life that endure to this day, and many of those individuals and friends are involved in CGI Commitments because they share a passion for making a positive impact in the world. As opposed to a conflict of interest, they share a common interest.”

A spokesman for Mr. Clinton, Angel Urena, said, “President Clinton counts many CGI participants as friends.” Mrs. Clinton’s campaign didn’t respond to a request for comment.

A Clinton Foundation spokesman, Craig Minassian, called the commitment an instance of “mission-driven investing…in and by for-profit companies,” which he said “is a common practice in the broader philanthropic space, as well as among CGI commitments.” Of thousands of CGI commitments, Mr. Minassian cited three other examples of what he described as mission-driven investing involving a private party and a for-profit company such as Energy Pioneer Solutions.

Ms. Eckert, one of those identified as a 29% owner of Energy Pioneer Solutions in 2009, didn’t respond to requests for comment.

Ms. McMahon, listed as another co-owner, said in an interview she didn’t know how the commitment to the company came to be made as she wasn’t involved. Ms. McMahon, 56 years old, described Mr. Clinton as “a family friend.”

Mr. Kleeb, who is the company’s chief executive as well as founder, said Ms. McMahon recruited Mr. Weiner as an investor. Mr. Weiner has a company, Financial Innovations Inc., that makes campaign souvenir items such as coffee mugs and pens. Mrs. Clinton’s current and 2008 presidential runs have paid Mr. Weiner’s firm about $4.2 million, federal reports show.

Mr. Weiner was among the first state Democratic officials to endorse Mr. Clinton for the presidency some 25 years ago. He has been a major donor to the Clinton Foundation and also to the campaign of Virginia Gov. Terry McAuliffe, another Clinton friend, foundation and Virginia records show. Mr. Weiner declined to be interviewed.

The other 5% investor, Mr. Tobias, has been the Democratic National Committee treasurer since 1999. He said he spent $450,000 for equity in Energy Pioneer Solutions and lent it $650,000.

“With my modest initial investment, I wound up owning a small percentage of the company,” Mr. Tobias said in an email. “It grew, because ultimately, between loans and equity investments, I’ve wound up putting a little more than $1 million into this effort.”

Mr. Tobias, a best-selling personal-finance writer and long-standing Clinton Global Initiative member, said he invested “because I would love to see the world more energy-efficient and hoped to make some money doing that.” Records of the Clinton Foundation show he has given it between $250,000 and $500,000, the same donation level shown for Mr. Weiner.

The company’s Mr. Kleeb said he knew the DNC treasurer from his own runs for office and invited him to invest. Mr. Kleeb won Democratic nominations in Nebraska for the U.S. House in 2006 and the Senate in 2008, but lost. His wife, Jane Kleeb, led opposition to the Keystone XL Pipeline and now heads a group called Bold Alliance opposing large fossil-fuel projects.

The Clinton Global Initiative, at a Sept. 23, 2010, gathering in New York, announced a $2 million commitment to Energy Pioneer Solutions from Kim Samuel, a Canadian academic, philanthropist and a director and owner of the Samuel Group of Companies, which includes steel businesses. She appeared on stage.

Julie Tauber McMahon, shown at an event in New York in 2014, owned 29% of Energy Pioneer Solutions. Photo: Nicholas Hunt/Patrick McMullan

A spokesman for Ms. Samuel, a longtime member of the Clinton Global Initiative, said she ultimately chose not to give the full $2 million.

This is a “personal financial matter and a personal investment,” said her spokesman, Alan Peck. “Following the initial September 2010 announcement and subsequent due diligence, the actual investment was $500,000 made by Ms. Samuel to Energy Pioneer Solutions on July 25, 2011.”

Mr. Tobias, the Democrats’ treasurer, said in an email a day after a Journal interview that he, too, contributed to the commitment. The 2010 announcement of it cited only Ms. Samuel.

Mr. Kleeb said the commitment announced was achieved, and he raised $2 million. He didn’t specify where the money came from.

The commitment was a late addition to the agenda for the September 2010 conference, internal Clinton Foundation documents reviewed by the Journal show.

According to one document, about two weeks before the conference, Ms. Samuel contacted an official in the Clinton Foundation’s commitments office and said Mr. Clinton wanted to feature her commitment to Energy Pioneer Solutions at that month’s gathering. Ms. Samuel’s spokesman didn’t respond to a question about that.

One of Mr. Clinton’s top advisers at the time, Doug Band, tried to prevent the commitment from being added to the agenda as an onstage event in the weeks prior to the conference, according to a document reviewed by the Journal.

The commitment was entered into a database on the Clinton Global Initiative website. A few months later, it was removed.

The reason was to avoid calling attention to Mr. Clinton’s friendship with one company co-owner, Ms. McMahon, and to protect the integrity of Mr. Clinton and the Clinton Global Initiative, according to people familiar with the matter.

The Clinton Foundation spokesman said the information was withheld at the request of Ms. Samuel, the announced provider of the commitment. Her spokesman didn’t respond to a question on that.

After the Journal asked about the absence from the database, the Clinton Foundation said it was making a policy change and would publish all previously unpublished commitments and all future ones.

Scott Kleeb, shown in 2008, founded Energy Pioneer Solutions. Photo: Nati Harnik/Associated Press

At the U.S. Energy Department, which had a grant program to encourage innovative approaches to weatherizing low-income people’s homes, giving a grant to a for-profit company was rare but permitted, said T.J. Hansell, a former contractor to the agency who worked on the program. An Energy Department spokeswoman declined to comment.

An Energy Department news release in 2010 announcing a grant to Energy Pioneer Solutions called it “a women-owned small business,” repeating language in the company’s application, which the Journal obtained under the Freedom of Information Act. Mr. Kleeb, the company’s founder and 29% owner, didn’t respond to a question on why it described itself as women-owned.

On occasion, Mr. Clinton has trumpeted the company’s work. Speaking in 2011 to an Omaha-based syndicated radio show called The Todd-N-Tyler Radio Empire, Mr. Clinton said: “There’s a group there called Pioneer Energy Solutions that retrofits housing—they’re in and out in a day…Eight hours and they’re out of there.”

Mr. Clinton also cited the operation, without naming the company, in his 2011 book “Back to Work.”

Mr. Tobias, the Democratic treasurer, said he discussed Energy Pioneer Solutions frequently with Mr. Clinton. “I wasn’t surprised that President Clinton was psyched about the potential for EPS and making America’s housing stock more efficient, cutting CO2 emissions and lowering consumers’ energy bills,” Mr. Tobias said.

Energy Pioneer Solutions has struggled to operate profitably. It lost more than $300,000 in 2010 and another $300,000 in the first half of 2011, said records submitted for an Energy Department audit. Mr. Kleeb noted that losses are common at startups.

The audit found deficiencies in how the company accounted for expenses paid with federal grant money, Energy Department records show. The company addressed the deficiencies, and a revised cost proposal was approved in 2011, said an Energy Department spokeswoman, Joshunda Sanders.

Recently, Mr. Kleeb laid off most of his staff, closed his offices, sold a fleet of trucks and changed his business strategy, promising to launch a national effort instead. “We are right now gearing up to start under this new model,” he said.

Asked if Energy Pioneer Solutions has ever broken even, Mr. Kleeb said, “We’re at that stage…We are expanding and doing well. We have partnerships, and it’s good.”

—Rebecca Ballhaus and Peter Nicholas contributed to this article.