Constraining planet-formation models based on the observed exoplanet population requires generating large samples of synthetic planetary systems, which can be computationally prohibitive. A significant bottleneck is simulating the giant-impact phase, during which planetary embryos evolve gravitationally and combine to form planets, which may themselves experience later collisions. To accelerate giant-impact simulations, we present a machine learning (ML) approach to predicting collisional outcomes in multiplanet systems. Trained on more than 500,000 N-body simulations of three-planet systems, we develop an ML model that can accurately predict which two planets will experience a collision, along with the state of the postcollision planets, from a short integration of the system’s initial conditions. Our model greatly improves on non-ML baselines that rely on metrics from dynamics theory, which struggle to accurately predict which pair of planets will experience a collision. By combining with a model for predicting long-term stability, we create an ML-based giant-impact emulator, which can predict the outcomes of giant-impact simulations with reasonable accuracy and a speedup of up to 4 orders of magnitude. We expect our model to enable analyses that would not otherwise be computationally feasible. As such, we release our training code, along with an easy-to-use user interface for our collision-outcome model and giant-impact emulator (https://github.com/dtamayo/spock).