A University of Wisconsin chancellor is getting pounded for paying adult film legend Nina Hartley $5,000 to give a speech on campus about pornography.

The “My Bare Lady” actress assured students during her 90-minute talk on Nov. 1 that it’s “OK to like porn” and discussed her decades-long career in the adult film industry.

Hartley was paid for her appearance by University of Wisconsin-La Crosse Chancellor Joe Gow, who cut a check from his discretionary fund — drawing ire from school officials.

School president Ray Cross sent a letter a week after her talk reprimanding Gow for using bad judgment and threatening that the stunt could cost him a raise next month, WISC-TV reported.

Cross said he would launch an audit into Gow’s discretionary spending, adding that Hartley’s appearance might put school funding in jeopardy.

“Therefore, you are being reprimanded for exercising poor judgment and for a lack of responsible oversight with respect to the use of state funds,” Cross wrote in his letter.

Gow apologized — and promised to reimburse the $5,000 fee from his own money.

About 70 students went to see Hartley, a sex educator who appeared in more than a thousand X-rated movies — including several in the “Debbie Does” franchise, including “Debbie Does Wall Street” and “Debbie Duz Dishes” — in the 1980s and ‘90s. She also had a role in the 1997 movie “Boogie Nights.”

“The word ‘pornography’ has such a pejorative connotation — it’s been caught up in a lot of emotionally charged conversations,” she told the group, according to the La Crosse Tribune.

Hartley said she viewed porn as safe and consensual — but also a fantasy.

“I wouldn’t normally go to a barn on a Tuesday morning to have sex on a hay bale. It’s my job, and we’re professionals,” she said. “It’s OK to like porn. It’s OK to not like porn. And it’s OK to be confused by porn. You are where you are, and you are who you are.”

Gow told the Associated Press on Wednesday that he enlisted Hartley to speak on campus because he wanted someone with a “perspective very different from our own and someone who wouldn’t be hateful and target groups.”

He said he found Hartley through an online search for college speakers.

“She seemed like a person who had a life experience dramatically different than the rest of us,” Gow said.