Nikki Haley had been serving in the South Carolina legislature for less than two years when she applied for a job in late 2006 as an accounting clerk at Wilbur Smith Associates, an engineering and design firm with state contracts.

She needed work. Her parents’ clothing business, where she and her husband, Michael Haley, had both worked, was winding down. Ms. Haley was earning a salary of just $22,000 as a part-time state legislator. And her husband’s own enterprise, involving businesses swapping goods and services, was losing money.

Wilbur Smith executives regarded Ms. Haley as overqualified for the accounting job. But because of her wide-ranging network, they would later say, they put Ms. Haley on a retainer, asking her to scout out potential new business. She never found any, a top executive later said. Over the next two years, the firm paid her $48,000 for a job the executive described as “a passive position.”

That contract, and a subsequent, much more lucrative one as a fund-raiser for a prominent hospital in her home county, allowed Ms. Haley to triple her income in just three years. But they also led her into an ethical gray area that tarnished her first term as South Carolina’s governor.

Ms. Haley did not disclose her Wilbur Smith contract until 2010, keeping it secret for more than three years. She also pushed for the hospital’s top priority — a new heart-surgery center — at the same time she was on its payroll. And Ms. Haley raised money for the hospital’s charitable foundation from lobbyists and businesses who may have had reason to curry favor with her.

The donations, one lobbyist wrote, were a way of “sucking up” to a rising political player.

The blurry line between Ms. Haley’s personal and public interests became the subject of a State House ethics investigation in 2012. The Republican-led committee concluded that Ms. Haley, by then the governor, had not violated any state ethics rules. But ethics experts and even some of her past supporters say the outcome was more an indictment of the lax rules and cozy ties between lawmakers and special interests than a vindication of her actions.