Downing Street has said its adviser Andrew Sabisky has resigned, following criticism of alleged past remarks on pregnancies, eugenics and race.
Labour had called for Mr Sabisky to go for reportedly saying black people had lower average IQs than white people.
He is also alleged to have said compulsory contraception could prevent "creating a permanent underclass".
Mr Sabisky tweeted: "I wanted to help the government not be a distraction... accordingly I've decided to resign."
"I know this will disappoint a lot of people but I signed up to do real work, not be in the middle of a giant character assassination," it continued.
"If I can't do the work properly there's no point, and I have a lot of other things to do with my life."
Mr Sabisky, who describes himself as a "superforecaster", was appointed earlier this year after the prime minister's chief adviser Dominic Cummings called for "misfits and weirdos" to apply for jobs in Downing Street.
Leaving his home on Tuesday, Mr Cummings told reporters: "Read Philip Tetlock's Superforecasters, instead of political pundits who don't know what they're talking about."
The reference appeared to be to a 2015 book of similar name on the science of prediction, Superforecasting, co-written by US-based academic Philip Tetlock.
Also speaking on Tuesday, Business Minister Kwasi Kwarteng said Mr Sabisky's alleged remarks had been "racist" and "totally unacceptable".
Asked how Mr Sabisky had been selected, Mr Kwarteng replied: "I've no idea what the process is. That's not my remit. I think it's unfortunate that he was hired".
"I think we should prevent racists coming into No 10 or wherever he was working. I think we do need to look at these processes," he told BBC Radio 5 Live, adding that it was "time to move on".
When asked on Monday, Downing Street did not comment on the remarks attributed to Mr Sabisky.
Boris Johnson's spokesman said at the time: "The prime minister's views on a range of subjects are well publicised and documented."
Responding to news of the resignation, Labour Party chairman Ian Lavery said: "It's right that Andrew Sabisky is no longer working in government.
"After No 10 publicly stood by him today, Boris Johnson has serious questions to answer about how this appointment was made and whether he agrees with his vile views."
Tory MP Caroline Nokes, who chairs the Commons Women and Equalities Committee, told BBC Radio 4's Today programme she was "relieved" Mr Sabisky had resigned.
However, she criticised the reaction from No 10, adding they "could have distanced themselves from his youthful comments at any point, but they chose not to do so".
What is Mr Sabisky believed to have said?
In a comment on a 2014 blog post on Mr Cummings' website, made by a user called "Andrew Sabisky", it is suggested that compulsory contraception could be used to stop a "permanent underclass".
"One way to get around the problems of unplanned pregnancies creating a permanent underclass would be to legally enforce universal uptake of long-term contraception at the onset of puberty," says the post.
"Vaccination laws give it a precedent, I would argue."
In a comment on another blog post on a different website in 2014, what appears to be the same user suggested black Americans had a lower average IQ than white Americans.
In a comment on a different blog that same year, a user with his name said: "There are excellent reasons to think the very real racial differences in intelligence are significantly - even mostly - genetic in origin, though the degree is of course a very serious subject of scholarly debate."
Mr Sabisky also suggested to Schools Week in July 2016 that the benefits of a purported cognitive enhancer, which can prove fatal, are "probably worth a dead kid once a year".
"Eugenics are about selecting 'for' good things," he said in the same interview. "Intelligence is largely inherited and it correlates with better outcomes: physical health, income, lower mental illness.
And in a Twitter post from 2019, he said: "I am always straight up in saying that women's sport is more comparable to the Paralympics than it is to men's."
What was the reaction when the remarks were uncovered?
Mr Sabisky's comments, and the government's reaction to the remarks, were criticised by opposition parties as well as members of the prime minister's own party.
Acting Liberal Democrat leader Ed Davey had called the government "a national embarrassment".
While Scotland's First Minister Nicola Sturgeon said: "These are really not acceptable headlines for any government to be generating."
Tory MP William Wragg also attacked the government's decision to appoint him, tweeting: "Andrew Sabisky's presence in No 10 is a poor reflection on the government... 'Weirdos' and 'misfits' are all very well, but please can they not gratuitously cause offence."