Two militants were killed by security forces in an encounter which ensued during a Cordon and Search Operation (CASO) on Tuesday night in the central Kashmir district of Budgam.