Reporting
It sounds like you have onion
It sounds like you have onion maggots. The adult onion maggot fly lays it's eggs in the soil around onion plants in the spring and the maggots appear when the soil warms up. Yellow sticky traps will capture the flies in the early spring or you can use row covers to protect the onions. Plant a new row of onions in a different spot of your garden. Try red onions which are more resistant.