Ortnek is a settlement in the Municipality of Ribnica in southern Slovenia. The railway line from Ljubljana to Kočevje runs through the settlement and the village has a railway station. The area is part of the traditional region of Lower Carniola and is now included in the Southeast Slovenia Statistical Region.
On a hill to the southwest of the settlement are the still visible ruins of Ortnek Castle, first mentioned in written documents dating to 1355, but built in the 13th century on a site that has also yielded Iron Age artefacts. The best preserved part of the castle is the 17th-century castle chapel, dedicated to Saint George . The castle was abandoned in the 19th century.