Navient, the nation’s largest servicer of student loans, has for years misled borrowers and made serious mistakes at nearly every step of the collections process, illegally driving up loan repayment costs for millions of borrowers, according to lawsuits filed on Wednesday by a federal regulator and two state attorneys general.

Navient handles $300 billion in private and federal loans for some 12 million people — touching about one in four student loan borrowers. Every customer may have been affected by Navient’s misdeeds, said Lisa Madigan, the attorney general of Illinois, announcing her own lawsuit with the one filed by the Consumer Financial Protection Bureau.

Navient does not make the loans, but it holds lucrative contracts to collect payments each month on behalf of banks, government and other lenders.

The damages sought could reach billions of dollars, said Ms. Madigan, who sued Navient and Sallie Mae — which split into the two companies in 2014. Washington State’s attorney general, Bob Ferguson, filed a similar lawsuit against both companies.

The lawsuits describe routine mistakes and lapses in oversight that over time added up to systematic failures, eerily similar to the mortgage servicing industry’s bungling of borrower accounts and property foreclosures during the 2008 recession. Financial companies eventually paid more than $100 billion to settle mortgage-related lawsuits.

Navient mishandled loan payments, buried critical information in fine print and set obstacles for borrowers trying to release co-signers from their loans, among other failings, according to the consumer bureau’s legal filing.

The move was one of a series of late-hour actions by the Obama administration just days before the inauguration of Donald J. Trump. It is also a politically perilous time for the consumer bureau, which has long been the target of criticism by Republican lawmakers. Several have called for the president-elect to fire its director, Richard Cordray — a move that would likely set off a legal challenge over the president’s authority to do so.

Republicans have also taken aim at the Dodd-Frank Act, the 2010 law that imposed more regulations on banks and created the consumer bureau. The law also specified that the bureau’s director can be fired only for cause, defined as “inefficiency, neglect of duty or malfeasance.”

Crushing student debt was a flash point on the campaign trail, as students complained that loans had diminished their career prospects. The issue helped fuel Bernie Sanders’s campaign in the Democratic primaries, and sparked discussions about reining in college costs. Total outstanding student loan debt hovers at more than $1.4 trillion. Student loan debt has surpassed credit card and auto loan debt.

Navient, which plans to fight the lawsuits, denied all wrongdoing.

“The allegations of the Consumer Financial Protection Bureau are unfounded, and the timing of this lawsuit — midnight action filed on the eve of a new administration — reflects their political motivations,” Patricia Nash Christel, a company spokeswoman, said in a written statement. “We will vigorously defend against these false allegations.”

Regulators and consumer groups have long complained about widespread abuses in the student loan market, but Wednesday’s coordinated state and federal action, which stems from investigations that began about three years ago, is a legal attack that is likely to resonate throughout the industry.

Navient is accused of deliberately steering borrowers away from income-based repayment plans that could have lowered their loan costs — in order to maximize its own profits. Enrolling customers in such plans can be time-consuming and complex, and Navient’s compensation system for its customer service representatives encouraged them to push struggling customers toward other options, according to the bureau’s complaint.

Derek S. said he is one such borrower. In 2011, when his loan payments kicked in, he was living in a homeless shelter in Boston. He had no job and three children.

[Derek] was exactly the kind of former student who should have had his payments reduced, according to Persis Yu, director of the Student Loan Borrower Assistance Project at the National Consumer Law Center. But that never happened, she said. After struggling for two years to make a dent on his loans, [he] defaulted and his wages from a new job were garnished. Collection calls poured in.

“I was just at a standstill,” said [Derek], whose debt has ballooned to more than $13,000.

Navient declined to comment on [Derek S.]’s case, but said it was “a leader in enrolling eligible borrowers into income-driven repayment programs.”

Sallie Mae, which was not named in the consumer bureau’s lawsuit, said in a statement that Navient had “accepted responsibility for all costs, expenses, losses and remediation” stemming from investigations into the company’s past lending practices.

The bureau’s lawsuit does not estimate how much money individual borrowers have lost, which would vary widely from person to person. But it alleges that the scope of the problem is vast, and involves a long list of reckless mistakes and potentially willful violations.

Navient “used shortcuts and deception to illegally cheat struggling borrowers out of their rights to lower payments,” Mr. Cordray said. “These unlawful practices have cost student loan borrowers across the country both heartache and money.”

In one example, the agency accused Navient of marring the credit reports of injured military veterans.

Borrowers with a “total and permanent” disability are eligible to have their federal student loans discharged. Navient improperly marked some of those charged-off loans as defaults, the bureau said, leaving those borrowers, including disabled soldiers, with black marks on their credit records that could have prevented them from obtaining mortgages and other loans.

And officials said that Sallie Mae, which originated some loans that Navient inherited, made loans that were crafted to ensnare students in debt. These loans were “designed to fail,” Ms. Madigan said, and should be discharged.

Student loan debt can haunt borrowers long after they graduate. In the past decade, the number of people 60 and older with student loans has quadrupled, according to a report in January by the consumer bureau. More than 2.8 million Americans over the age of 60 had student loan debt outstanding, up from 700,000 in 2005.

This is not the first time in the spotlight for Navient or its subsidiaries. Consumer groups have long been raising alarms about the company and its practices.

“The allegations in the complaint mirror the experiences of the dozens of borrowers that we have worked with,” said Ms. Yu at the National Consumer Law Center.

The bureau’s lawsuit focuses on possible wrongdoing from 2010 onward. The state lawsuits stretch back further, as early as 2000, Ms. Madigan said.

As far back as August 2015, Navient warned investors in a regulatory filing that it was under investigation by the consumer bureau and could face legal action.

In 2014, the Justice Department and the Federal Deposit Insurance Corporation, fined Navient for illegally overcharging military members. The company, officials found, flouted the Servicemembers Civil Relief Act, a federal law that protects active duty military members, requiring lenders to reduce interest rates on any loans to 6 percent.

One of Navient’s subsidiaries, Pioneer Credit Recovery, which was also named in the lawsuits announced Wednesday, previously collected on defaulted federal student debt, but the Education Department ended that arrangement two years ago because, it said, Pioneer made “materially inaccurate representations” to borrowers.

Navient still holds a contract with the department to service federal student loans, which runs through 2019.

A version of this article appears in print on January 19, 2017, on Page A1 of the New York edition with the headline: U.S. Suit Says Loan Collector Duped Students.