See Question:
How the heck do you get past or defeat the uber Rancor with all the green stuff?
Get to the long hallway with the big blue glowing door at the end (run down to the end of the hallway and you can find a secret), at the begining of the hallway there should be a small room with a big glass window on the one side of it, on the one side of the room (outside) there should be a lever, pull the lever and a crate should lower, go into the room with the big glass window, go up to the control room with 2 floors and alot of glass windows, wait till the rancor gets right infront of the glass then hit the lever on the second floor and the crate should squish the rancor into the big blue glowing door.