iPhoto Library is compatible with the Photos app of El Capitan. All you have to do is, just open that iPhoto Library in Photos and Photos will migrate that library to it.
On your old Mac, go to Macintosh HD > Users > home folder > Pictures folder and you will see the iPhoto Library there. Copy it to your new Mac's pictures folder (using an external hard drive or direct connection).
Then hold down Option key and open Photos. Select Choose Library and locate and select the iPhoto Library you copied. Photos will start to migrate the library to it.
If you get any error that the iPhoto Library is too old to work with Photos, then you need to upgrade it using Library Upgrader. Follow the instructions in this article --> https://support.apple.com/en-in/HT202358
Alternative solution :
You can also manually open the iPhoto Library in Finder and copy the Originals or Masters folder from that library to your new Mac's Photos. This Originals or Masters folder contains all the photos ever imported to iPhoto Library. To do that, go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show PackageContents'. Cope the Masters or Originals folder to your new Mac and import that folder to Photos app.
Note : Only clean the older Mac after successfully transferred all photos to the Photos app of new Mac.
If you have any difficulty on following the steps above, please let me know and I will walk you through it