Combine the onion and cucumber slices in a clean spring-top jar.
Combine the remaining ingredients, with the exception of the garlic, in a non-reactive saucepan. Bring to a boil and simmer for 4 full minutes to wake up the spice flavors.
Add the garlic cloves to the jar. Slowly and gently pour the pickling liquid over the onion and cucumber slices, filling to the top of the jar.
Cool to room temperature. Top off the pickles with any remaining pickling liquid and refrigerate.
Recipe courtesy of Alton Brown