It should work fine. They are both using El Capitan 10.11.4.
What I would do is to buy an external drive same size or larger than your MacBook Pro.
Open Disk Utility>Erase and format the external HD to Mac OS Extended (Journaled) and a GUID partition.
Then use a third party application such as Carbon Copy Cloner Carbon Copy Cloner (Not free, but worth the price) or Super Duper to copy all data from the internal HDD of the iMac.
The clone will be a exact copy of your hard drive and it will be bootable.
Connect the cloned drive to your MacBook Pro and
Boot the MBP with the OPTION key (Startup Manager) and select the external drive. How to choose a startup disk on your Mac
If it boots the MBP, test the operation.
If you are happy that it works ok, then clone your external drive to your MacBook Pro.
Option 2: Use migration assistant and copy the data from your iMac to your MacBook Pro. Move your content to a new Mac - Apple Support
Kim