事に is not placed at the end of the sentence. The full sentence is
あまり物騒な事に首を突っ込んだらダメよ
XXXに首を突っ込む is a set phrase. It means "to meddle into something." It is almost equivalent to English's "poke your nose oninto something that is none of your business."
You can understand the sentence as
It's bad to excessively poke your nose oninto dangerous things.