The incident happened on the second floor of the Arts Building where the assistant professor's room is located.
Around 2pm, the assistant professor's wife and daughter came to his room and found it locked from inside, the wife told bdnews24.com.
They kept knocking the door from outside, and after 10 minutes, he opened the door, locked it and rushed his wife and daughter out of the building, she said.
Later, around 4pm, Assistant Proctor Abu Hossain Muhammad Ahsan came and broke open the door and brought the 'stranded' female teacher out of the room.
"The proctor told me that a female colleague is confined to a room in the Arts Building. I just came to rescue her," he told bdnews24.com.
When asked about the allegation of extra-marital affair, the assistant proctor said "The university authorities will look into the matter. My job was to bring her out."
The assistant professor's wife alleged that their family life was on the verge of breaking point because of the relationship between the two.
The assistant professor was unreachable on mobile phone.