Apple said increasing driver focus is the aim of the development, which will be included in the next version of its mobile operating system, iOS 11, in the autumn.
By enabling the feature now, Apple is taking some responsibility for its technology and the distraction it can be for drivers.
Users will be able to see Apple Maps, Apple's navigation application, while driving - though they will be unable to input destinations.
We all know texting while driving is unsafe.
The system will automatically detect when someone is in a vehicle and will block notifications and texts and stop drivers from opening apps on their phone.
Once they are no longer driving, users have the option of overriding the "Do Not Disturb While Driving" feature by turning on the screen with the power button and clicking the "I'm not driving" option on the screen.
The system detects when the phone is in a auto when it is paired to a car's Bluetooth system or when it detects that it is travelling quickly past many wi-fi networks.
In emergency situations, recipients of that message will be able to reply with the word "urgent" to push the message through.
Road safety experts have praised a potentially lifesaving feature coming to iPhones later this year that will lock drivers out of their phone while they are behind the wheel.
"When you finish that first drive we're going to suggest, 'hey how about we activate do not disturb while driving?'", said Apple's senior vice president of software engineering Craig Federighi during the keynote.