Nexus 5 Gets Root, Courtesy Chainfire

Popular Android developer Chainfire, who is best known for his app "Chainfire 3D", has published a working method to attain root on the new Nexus 5 barely a day after the phone has been launched. This easy to accomplish root procedure takes minutes to carry out, and all it really asks for is a USB data cable, computer, Nexus 5 connected in fastboot mode and some simple command lines to be executed. After the procedure is completed, users will find the "SuperSU" app installed on their new device. Just keep in mind that if you have yet to unlock your phone even once, all your data will be wiped (no biggie, it's a new phone anyway).

Nexus 5 root by Chainfire - XDA Developer forums