The Academy's board of governors met on Tuesday night and voted to strip both men of membership "in accordance with the organisation's Standards of Conduct", it said a statement.
In December the organisation, which hands out the Oscars, adopted a code of conduct for its 8,400 members after dozens of women came forward to accuse film moghul Harvey Weinstein of sexual assault.
Allegations against Weinstein prompted an international uproar and encouraged many women to share their own experience of sexual harassment or rape under the hashtag #MeToo.
Weinstein was expelled from the Academy in October 2017.
Polanski wanted in US
Polanski, who lives in France, is wanted in the United States for the statutory rape of a 13-year-old girl in 1977.
The 84-year-old director admitted unlawful sex with Samantha Geimer, and served 42 days in prison, but later fled the US.
He has been seeking a deal in the case with US authorities since then.
Polanski’s attorney Harland Braun said Thursday the decision “blindsided” the director, who learned of his expulsion from media reports.
Braun accused the academy of failing to follow its rules and give Polanski’s team a chance to respond to efforts to expel him. He said he and Polanski’s agent will ask for the director to be reinstated next week and they want a hearing before a new vote on his membership is taken.
He spends his time between France, Poland, his ancestral homeland, and Switzerland.
All three countries have refused to extradite him.
The Swiss authorities also turned down a US warrant in 2010, after placing Polanski under house arrest for nine months.
A Polish court also rejected a US request when he was filming in Krakow in 2015.
Polanski was picked to head the jury at the French equivalent of the Oscars in February 2017 but stepped down due to public outcry over his participation.
At the time, France's women's minister Laurence Rossignol called it a "shocking" decision for Polanski to preside over the Cesars.
An online petition calling for Polanski to be removed as head of the jury had received more than 42,000 signatures in the first three days.
Cosby faces jail
As for Bill Cosby, a 12-member Pennsylvania jury found the 80-year-old American actor guilty on three counts of sexual assault on 26 April for drugging and molesting Andrea Constand at his Philadelphia mansion in January 2004.
He faces up to 30 years in prison at his sentencing later this year.
Cosby's wife, Camille, described his conviction as "mob justice, not real justice".
The Academy's 54-member board of governors includes some of the biggest names in the industry, among them Steven Spielberg, Tom Hanks and Whoopi Goldberg.
Its own president John Bailey was investigated earlier this year and cleared of any wrongdoing after a sexual harassment complaint was filed against him.
Bailey is a veteran cinematographer who shot such films as The Big Chill and Groundhog Day.