A herpes IgM test can detect early HSV infection by looking for IgM antibodies. Your body produces IgM and IgG antibodies after HSV infection. The IgM test can detect HSV earlier than the IgG test.
A positive IgM test might mean you have a new or recurrent HSV infection. If you have a positive IgM test and a negative IgG test, you likely have a new infection.