I have an ESTA for the US that expires the end of July 2017. Last year, I was granted a one-year B1 visa for an extended stay, which expires at the end of June 2017. I will travel to the US on July 1 this year. Is my original ESTA still valid or did the granting of the B1 visa mean that it was made void? If it is void, can I apply for a new ESTA while still holding a B1 visa?
There is nothing in either 8 USC §1187 or 8 CFR 217 that suggests your visa application will have invalidated your ESTA authorization. You can check your existing authorization to confirm this at https://esta.cbp.dhs.gov/esta/.
The ESTA page says you cannot apply for authorization if you hold a valid B visa, but they likely didn't consider the case of someone with an expiring visa, and it should be fine to apply for a new authorization before your current visa expires. (You cannot enter the US in the visa waiver program when you have a valid B visa, but because your planned trip is after the expiration of your visa, you aren't planning to do that.)