Yes. The free shipping threshold is calculated from the cart value after discounts.
An example for a free shipping threshold of €40.00: if a customer has €45.00 worth of products in the cart and uses a -20% discount code, the cart value after the discount is €36.00 - below the threshold, so shipping remains paid. Without the discount code, the same cart exceeds the threshold and shipping is free.