"Are we going to exclude them from our history?" she asks while speaking to press at a film festival in Spain.
"I can't approve, in any way, of the fact -- whatever he has done -- that you then start to cut him out of films," she said at the San Sebastian Film Festival on Tuesday, according to the BBC.
Dench, an Oscar winner like Spacey, said she still considers him a pal and that he provided "inestimable comfort" when they worked together on 2001 drama "The Shipping News."
"Are we to go back throughout history now and anyone who has misbehaved in any way, or has broken the law, or has committed some kind of offense, are they always going to be cut out?" she asked while speaking to the press.
"Are we going to exclude them from our history?" she added. "I don't know about any of the conditions of it, but nevertheless I think he is, and was, a most wonderful actor ... and a good friend."
Spacey was replaced as by actor Christopher Plummer in the role as J. Paul Getty in Ridley Scott's 2017 kidnapping drama, which earned Plummer an Oscar nomination. The older actor also expressed sympathy for Spacey when asked for comment on the situation.
"I think it's very sad what happened to him. Kevin is such a talented and a terrifically gifted actor, and it's so sad," he told Vanity Fair last November at the premiere of a different film. "It's such a shame. That's all I can say, because that's it."
Spacey was accused of sexual harassment, misconduct, assault and even attempted rape of a teenager when he was 24. Spacey denied the allegation through his lawyer at the time.
The former Hollywood heavyweight was also fired by Netflix and written out of the final season of "House of Cards," on which he played the main character, Frank Underwood. Eight male employees working on the Netflix show also accused Spacey of harassment or groping when allegations poured out of the woodwork last year.
Dench said she "couldn't imagine" what Spacey is up to these days. Last we heard, though, his rep said he's seeking some kind of treatment.