This is a moth pupa of some sort. If it's wiggling around, it's just about ready to hatch. Do you remember what plant was there last year--it might provide a hint to identification. For example, people have found the pupae of tomato hornworm in the soil where their tomatoes were growing the previous year. If you're really curious, you can put it in a jar and see what comes out!