Two terrorists were killed in an encounter with security forces in Sopore town of Jammu and Kashmir's Baramulla district on Friday.