Exchange-traded funds (ETFs) are typically viewed as passive index trackers. In contrast, we show that corporate bond ETFs actively manage their portfolios, trading off index tracking against liquidity transformation. In our model, ETFs optimally choose creation and redemption baskets that include cash and only a subset of index assets, especially if those assets are illiquid. Our evidence supports the model’s predictions. We find that ETFs dynamically adjust their baskets to correct portfolio imbalances while facilitating ETF arbitrage. Basket inclusion improves bond liquidity, except in periods of large imbalance between ETF creations and redemptions, such as the COVID-19 crisis of 2020.