Steps to add custom aspx page in _layouts folder in SharePoint 2010 -
1. Open the Visual studio and create an empty project “DeployAspxToLayouts”.
2. Next, select “Deploy as Farm solution”.
3. Next, right click on the Project and add navigate to “Add -> SharePoint “Layouts” Mapped Folder”. See the screen below

4. Once you add that, you will have a Layouts folder structure in your project. Next we will add our custom aspx page(existing or new) to the Layouts folder that got created in our project. For this example i am creating a new aspx file and adding it to my custom folder i.e. “DeployAspxToLayouts” which i created under my Layouts folder.