Apple Inc. is in discussions with the Department of Veterans Affairs to provide portable electronic health records to military veterans, a partnership that would simplify patients’ hospital visits and allow the technology giant to tap millions of new customers, according to people familiar with the effort and emails reviewed by The Wall Street Journal.

Under the plans being discussed, Apple would create special software tools allowing the VA’s estimated nine million veterans currently enrolled in the system to transfer their...