We provide firm-level evidence on the real effects of shadow banking in terms of technological innovation. Firm-to-firm entrusted loans, the largest part of the shadow banking sector in China, enhance the borrowers’ innovation output. The effects are more prominent when the borrowers are subject to severer financial constraints, information asymmetry, and takeover exposures. A plausible underlying channel is capital reallocations from less productive but easy-financed lender firms to more innovative but financially less-privileged borrower firms. Our paper suggests shadow banking helps correct bank credit misallocations and thus serves as a second-best market design in financing the real economy.