I have a valid ESTA since February 2014 which is valid until 2016. I used it last month to visit the U.S. for 2 days. After that I applied for a B2 Visa to stay with friends for 1 year which has just been denied. Can I still travel to the U.S. with my current ESTA for a holiday of 2 weeks in the upcoming period?
You were required to apply for a new ESTA, if you want to use the Visa Waiver Program, once your visa was denied. In general, it's usually not a good idea to apply for a B visa if you are from a VWP country, unless truly necessary.
(e) New travel authorization required. A new travel authorization is required if any of the following occur: ....
(5) The circumstances underlying the alien's previous responses to any of the ESTA application questions requiring a “yes” or “no” response (eligibility questions) have changed.
Have you ever been denied a U.S. visa you applied for with your current or previous passport, or have you ever been refused admission to the United States or withdrawn your application for admission at a U.S. port of entry?
ESTA is a pre-approval to enter the US under the Visa Waiver Program (VWP). It does NOT guarantee entry to the US, and all of the criteria of the VWP still apply at the time of entry.
One of the requirements of the VWP is that it can not be used if you have been refused a US Visa in the past.
Thus despite holding a (potentially) valid ESTA, you are not elligible to enter the US using the Visa Waiver Program. The only way that you will be allowed entry is to apply for a Visa, and hope that it is approved this time...