You can do this with Active Directory Federation Services (ADFS) or another federation provider.
Microsoft has a host of resources available regarding ADFS setup and configuration. link to ADFS custom login pages on TechNet:
Customizing the AD FS Sign-in Pages
Other federation providers will have their own options around customizations. some of these like ADFS can be configured on-site. Others are hosted providers. There is link on MSDN with information on using some of the more popular services and products here:
Azure AD federation compatibility list
Two of the more used options are:
- CA Site Minder
- IBM Tivoli Identity Manager