The operation was driven with a frenetic focus by the billionaire, who channeled his resentment of regulatory oversight into a drastic overhaul of government agencies.
On the last Friday of September 2023, Elon Musk dropped in about an hour late to a dinner party at the Silicon Valley mansion of the technology investor Chamath Palihapitiya.
Mr. Musk’s visit was meant to be discreet. Still skittish about getting involved publicly in politics, he told the guests he had to be careful about supporting anyone in the Republican nomination fight. And yet here he was — joined by Claire Boucher, the singer known as Grimes and the mother of three of his children — at a $50,000-a-head dinner in honor of the presidential candidate Vivek Ramaswamy, who was running as an entrepreneur who would shake up the status quo.
As the night wore on, Mr. Musk held forth on the patio on a variety of topics, according to four people with knowledge of the conversation: his visit that week to the U.S.-Mexico border; the war in Ukraine; his frustrations with government regulations hindering his rocket company, SpaceX; and Mr. Ramaswamy’s highest priority, the dismantling of the federal bureaucracy.
Mr. Musk made clear that he saw the gutting of that bureaucracy as primarily a technology challenge. He told the party of around 20 that when he overhauled Twitter, the social media company that he bought in 2022 and later renamed X, the key was gaining access to the company’s servers.
Wouldn’t it be great, Mr. Musk offered, if he could have access to the computers of the federal government?
Just give him the passwords, he said jocularly, and he would make the government fit and trim.
What started as musings at a dinner party evolved into a radical takeover of the federal bureaucracy. It was driven with a frenetic focus by Mr. Musk, who channeled his libertarian impulses and resentment of regulatory oversight of his vast business holdings into a singular position of influence.
Without ceding control of his companies, the richest man in the world has embedded his engineers and aides inside the government’s critical digital infrastructure. Already, his Department of Government Efficiency, or DOGE, has inserted itself into more than 20 agencies, The New York Times has found.
Mr. Musk’s strategy has been twofold. His team grabbed control of the government’s human resources agency, the Office of Personnel Management, commandeering email systems to pressure civil servants to quit so he could cull the work force. And it burrowed into computer systems across the bureaucracy, tracing how money was flowing so the administration could choke it off. So far, Musk staff members have sought access to at least seven sensitive government databases, including internal systems of the Social Security Administration and the Internal Revenue Service.
Mr. Musk’s transformation of DOGE from a casual notion into a powerful weapon is something possible only in the Trump era. It involves wild experimentation and an embrace of severe cost-cutting that Mr. Musk previously used to upend Twitter — as well as an appetite for political risk and impulsive decision-making that he shares with President Trump and makes others in the administration deeply uncomfortable.

In reporting how Mr. Musk and his allies executed their plan, The New York Times interviewed more than 60 people, including DOGE workers, friends of Mr. Musk’s, White House aides and administration officials who are dealing with the operation from the inside. Speaking on the condition of anonymity, many described a culture of secrecy that has made them afraid to speak publicly because of potential retaliation.
Mr. Musk’s stealth approach stunned both Democrats and civil servants. Failing to imagine an incursion from inside the bureaucracy, they were caught essentially defenseless.
The Times has learned new details about how the operation came together after the election, mapped out in a series of closely held meetings in Palm Beach, Fla., and through early intelligence-gathering efforts in Washington.
Seasoned conservative operatives like Stephen Miller and Russell Vought helped educate Mr. Musk about the workings of the bureaucracy. Soon, he stumbled on an opening. It was a little-known unit with reach across the government: the U.S. Digital Service, which President Barack Obama created in 2014 after the botched rollout of healthcare.gov.
Mr. Musk and his advisers — including Steve Davis, a cost cutter who worked with him at X and other companies — did not want to create a commission, as past budget hawks had done. They wanted direct, insider access to government systems. They realized they could use the digital office, whose staff had been focused on helping agencies fix technology problems, to quickly penetrate the federal government — and then decipher how to break it apart.
They would call it the U.S. DOGE Service, and they would not even have to change the initials.
They began their move on the digital service unit earlier than has previously been reported, The Times found, while President Joseph R. Biden Jr. was still in office — giving them the ability to operate on Mr. Trump’s first day.
Around the time that Mr. Musk identified the office as a key part of his strategy late last year, the Trump transition team gained a key ally on the inside. A U.S.D.S. veteran named Amy Gleason rejoined its staff as a senior adviser at the end of the Biden administration, described to other employees as someone who would aid the Trump transition. Ms. Gleason, who would later be named the acting administrator of the Department of Government Efficiency, recommended that the unit bring aboard several young engineers who would later become part of Mr. Musk’s team.
Allies of Mr. Musk, meanwhile, fanned out across the government as part of the transition, extracting intelligence about computer systems, contracts and personnel.
The team is now moving faster than many of the legal efforts to stop it, making drastic changes that could be hard to unwind even if they are ultimately constrained by the courts. Mr. Musk’s associates have pushed out workers, ignored civil service protections, torn up contracts and effectively shuttered an entire agency established by Congress: the U.S. Agency for International Development.
A month into Mr. Trump’s second term, Mr. Musk and his crew of more than 40 now have about all the passwords they could ever need.
His swift success has been fueled by the president, who handed him the hazy assignment of remaking the federal government shortly after the billionaire endorsed him last summer. Flattered that Mr. Musk wanted to work with him, Mr. Trump gave him broad leeway to design a strategy and execute it, showing little interest in the details.
“President Trump’s brilliant idea to create a Department of Government Efficiency remains overwhelmingly popular with the American people, and there is no one better on the planet to oversee this effort than Elon Musk,” Karoline Leavitt, the White House press secretary, said in a statement.
She declined to answer specific questions about The Times’s reporting, but added that Mr. Trump, Mr. Musk and the cabinet “are working together to identify waste, fraud and abuse, and have already saved taxpayers billions of dollars.”
At three pro-Trump dinners organized by Mr. Musk and the billionaire investor Nelson Peltz over the course of 2024, Mr. Musk touted the need for a smaller government but struggled to offer specific ideas.
At the time, he was infuriated by Mr. Biden and what he saw as deliberate efforts by the administration to harm his businesses Tesla and SpaceX.
By the time Mr. Trump took the stage at an outdoor rally in Butler, Pa., on July 13, Mr. Musk saw him as his only hope. Immediately after a bullet fired by a would-be assassin grazed Mr. Trump’s ear, coming within an inch of possibly killing him, Mr. Musk endorsed him in a post on X. In the months that followed, he would plow almost $300 million into efforts to re-elect Mr. Trump.
But Mr. Musk also quickly seeded the idea with Mr. Trump that he could be more than just a campaign donor.
His first public mention of what would evolve into the Department of Government Efficiency came less than three weeks later. More than an hour into a lengthy Aug. 2 podcast with the interviewer Lex Fridman, Mr. Musk began musing about what he saw as overregulation hampering human progress.
“I wish you could just, like, for a week, go into Washington,” Mr. Fridman said, proposing that his counterpart make “government smaller.”
“I have discussed with Trump the idea of a government efficiency commission,” Mr. Musk replied. “And I would be willing to be part of that commission.”
Eleven days later, Mr. Musk hosted Mr. Trump for a live audio discussion on X, using the power of the platform he owned to champion his preferred candidate. Mr. Musk once again raised his idea of a “government efficiency commission” to ensure that taxpayer money was “spent in a good way.”
“I’d love it,” Mr. Trump said.
The national debt grew by roughly $8 trillion during Mr. Trump’s first term. Privately, he had told allies in 2020 that in “year five” of his presidency — which in his mind would be 2021 — he would begin tackling the debt crisis.
Since then, Mr. Trump has become more fixated on the debt; he has told advisers that America could be on the verge of a “1929” moment, his shorthand for another Great Depression. He has described Mr. Musk as a “genius” and said that if anyone could tackle this problem, it was the world’s richest man.
As the summer went on, Mr. Musk continued to toy with the idea. On Aug. 19, he responded to an account on X suggesting that he name the proposed organization the Department of Government Efficiency. Its abbreviation, DOGE, was a reference to Dogecoin, a meme cryptocurrency that the billionaire had joked about for years, sometimes causing wild fluctuations in its price.
“That is the perfect name,” Mr. Musk replied on X.
By Sept. 5, the idea was announced as a central pillar of Mr. Trump’s economic proposals. In a speech at the Economic Club of New York, Mr. Trump, who by then was the Republican nominee, said he would create a government efficiency commission helmed by Mr. Musk. The effort, which Mr. Trump offered few details about at the time, would “save trillions of dollars,” he claimed.
The idea gathered momentum in the month before the election. The billionaire Howard Lutnick, who was running Mr. Trump’s transition operation and would later become his commerce secretary, envisioned the endeavor as a partnership between him and Mr. Musk, visiting him in Texas in October to discuss the project.
Mr. Lutnick told associates at the time that Mr. Musk would cut $1 trillion of waste out of the budget and that Mr. Lutnick would earn $1 trillion for the United States through tariffs, the closing of tax loopholes and a more aggressive capitalization of America’s natural resources and hard assets. Together those efforts would make up $2 trillion and eliminate the federal deficit.
But Mr. Musk’s concept of the Department of Government Efficiency was still quite unformed. A little more than a week before the election, at a Trump rally at Madison Square Garden, the billionaire muddled Mr. Lutnick’s specifics by combining the cutting and revenue-raising portions of the effort. In front of a raucous crowd, Mr. Lutnick asked the world’s richest man how much he thought he could eliminate from the federal budget.
“Well, I think we can do at least $2 trillion,”