<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva, formerly WebFilings-->
<!-- -->
<linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferings" xlink:href="nmih-20140930.xsd#CommonStockOfferings" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:href="nmih-20140930.xsd#CommonStockOfferingsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheets" xlink:href="nmih-20140930.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20140930.xsd#CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="nmih-20140930.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:href="nmih-20140930.xsd#CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:href="nmih-20140930.xsd#CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquity" xlink:href="nmih-20140930.xsd#CondensedConsolidatedStatementsOfShareholdersEquity" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:href="nmih-20140930.xsd#CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20140930.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20140930.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20140930.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20140930.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:href="nmih-20140930.xsd#FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20140930.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20140930.xsd#IncomeTaxes" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20140930.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:href="nmih-20140930.xsd#IntangibleAssetsAndGoodwill" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:href="nmih-20140930.xsd#IntangibleAssetsAndGoodwillDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:href="nmih-20140930.xsd#IntangibleAssetsAndGoodwillTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20140930.xsd#Investments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:href="nmih-20140930.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20140930.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20140930.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:href="nmih-20140930.xsd#InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20140930.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20140930.xsd#InvestmentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:href="nmih-20140930.xsd#InvestmentsUnrealizedLossesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Litigation" xlink:href="nmih-20140930.xsd#Litigation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20140930.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20140930.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:href="nmih-20140930.xsd#ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:href="nmih-20140930.xsd#ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:href="nmih-20140930.xsd#ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:href="nmih-20140930.xsd#ShareBasedCompensation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:href="nmih-20140930.xsd#ShareBasedCompensationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20140930.xsd#ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:href="nmih-20140930.xsd#ShareBasedCompensationStockOptionActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:href="nmih-20140930.xsd#ShareBasedCompensationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20140930.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:href="nmih-20140930.xsd#SoftwareAndEquipmentDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20140930.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20140930.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformation" xlink:href="nmih-20140930.xsd#StatutoryInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationNarrativeDetails" xlink:href="nmih-20140930.xsd#StatutoryInformationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationRiskToCapitalDetails" xlink:href="nmih-20140930.xsd#StatutoryInformationRiskToCapitalDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationStatutoryIncomeDetails" xlink:href="nmih-20140930.xsd#StatutoryInformationStatutoryIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:href="nmih-20140930.xsd#StatutoryInformationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20140930.xsd#Warrants" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:href="nmih-20140930.xsd#WarrantsDetails" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferings" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockLineItems" xlink:label="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_45930F044553B446884038C411DC4D8F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_45930F044553B446884038C411DC4D8F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockAxis" xlink:label="loc_nmih_SaleofStockAxis_187E964F764E262FEC3D38C411DCB7AF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_45930F044553B446884038C411DC4D8F" xlink:to="loc_nmih_SaleofStockAxis_187E964F764E262FEC3D38C411DCB7AF" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_3619BB04F4CDDD882FFA38C411DD7D27_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_nmih_SaleofStockAxis_187E964F764E262FEC3D38C411DCB7AF" xlink:to="loc_nmih_SaleofStockDomain_3619BB04F4CDDD882FFA38C411DD7D27_default" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_3619BB04F4CDDD882FFA38C411DD7D27" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_nmih_SaleofStockAxis_187E964F764E262FEC3D38C411DCB7AF" xlink:to="loc_nmih_SaleofStockDomain_3619BB04F4CDDD882FFA38C411DD7D27" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IPOMember" xlink:label="loc_us-gaap_IPOMember_9ED9512558DDB72D488438C411DDA4EB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_SaleofStockDomain_3619BB04F4CDDD882FFA38C411DD7D27" xlink:to="loc_us-gaap_IPOMember_9ED9512558DDB72D488438C411DDA4EB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_4E8F3BF1CAB0069DF98B38C411DD0A16" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_45930F044553B446884038C411DC4D8F" xlink:to="loc_us-gaap_StatementClassOfStockAxis_4E8F3BF1CAB0069DF98B38C411DD0A16" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_7E62EBD4CBBD74FDF8C538C411DD8A08_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4E8F3BF1CAB0069DF98B38C411DD0A16" xlink:to="loc_us-gaap_ClassOfStockDomain_7E62EBD4CBBD74FDF8C538C411DD8A08_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_7E62EBD4CBBD74FDF8C538C411DD8A08" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4E8F3BF1CAB0069DF98B38C411DD0A16" xlink:to="loc_us-gaap_ClassOfStockDomain_7E62EBD4CBBD74FDF8C538C411DD8A08" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_0949B6CDB799426ABA6738C411DDFD6E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_7E62EBD4CBBD74FDF8C538C411DD8A08" xlink:to="loc_us-gaap_CommonClassAMember_0949B6CDB799426ABA6738C411DDFD6E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_FEE6DE6780E26D27AEEA38C411DD3800" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_FEE6DE6780E26D27AEEA38C411DD3800" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_059C501F6B088742F1083957788B0982" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_059C501F6B088742F1083957788B0982" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_ProceedsfromIssuanceInitialPublicOfferingNet" xlink:label="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_373F849A85E3B98DCFE138C411DD8645" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:to="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_373F849A85E3B98DCFE138C411DD8645" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage" xlink:label="loc_nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage_113CF21A19EA1394633638C411DDAC1D" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_F0FF23EB9B5E49FB2A6738C411DD6677" xlink:to="loc_nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage_113CF21A19EA1394633638C411DDAC1D" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_ED9D57A8B914947A7A54595CCD97BD96" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_StatementTable_ED9D57A8B914947A7A54595CCD97BD96" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_9D7A7A9190BBF79F56BD595CCD9707FD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_ED9D57A8B914947A7A54595CCD97BD96" xlink:to="loc_us-gaap_StatementClassOfStockAxis_9D7A7A9190BBF79F56BD595CCD9707FD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_6F3234D87FCFF15C5457595CCD97E5F3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9D7A7A9190BBF79F56BD595CCD9707FD" xlink:to="loc_us-gaap_ClassOfStockDomain_6F3234D87FCFF15C5457595CCD97E5F3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_6F3234D87FCFF15C5457595CCD97E5F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9D7A7A9190BBF79F56BD595CCD9707FD" xlink:to="loc_us-gaap_ClassOfStockDomain_6F3234D87FCFF15C5457595CCD97E5F3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_C8F959DF0D5386FA7AE3595CCD97F5C1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_6F3234D87FCFF15C5457595CCD97E5F3" xlink:to="loc_us-gaap_CommonClassAMember_C8F959DF0D5386FA7AE3595CCD97F5C1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MarketableSecuritiesFixedMaturitiesAbstract" xlink:label="loc_us-gaap_MarketableSecuritiesFixedMaturitiesAbstract_6BB1506A67DD9000C5E1595CCD989865" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_MarketableSecuritiesFixedMaturitiesAbstract_6BB1506A67DD9000C5E1595CCD989865" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_CF15027E076A3F47FD70595CCD98B1C0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MarketableSecuritiesFixedMaturitiesAbstract_6BB1506A67DD9000C5E1595CCD989865" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_CF15027E076A3F47FD70595CCD98B1C0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Investments" xlink:label="loc_us-gaap_Investments_3296A0171E5B4CBE274C595CCD9812FE" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_Investments_3296A0171E5B4CBE274C595CCD9812FE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_EE5D637E85FFC9819DBE595CCD98A85A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_EE5D637E85FFC9819DBE595CCD98A85A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_B1C31A0F48A91DCB6079595CCD984EFA" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_B1C31A0F48A91DCB6079595CCD984EFA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_7D637601B209481717B6595CCD987A40" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_7D637601B209481717B6595CCD987A40" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_9E2D674BEAD8D2DAE998595CCD982204" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_9E2D674BEAD8D2DAE998595CCD982204" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_97BD03F00B78E0EF9FCE595CCD989329" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_97BD03F00B78E0EF9FCE595CCD989329" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_EB32D9C3BF72DB6245D6595CCD98C114" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_EB32D9C3BF72DB6245D6595CCD98C114" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_9E355F209C50F0325740595CCD982F79" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_9E355F209C50F0325740595CCD982F79" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_D946FA6A1680FB0A77D8595CCD98ADC7" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_OtherAssets_D946FA6A1680FB0A77D8595CCD98ADC7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_7898E4EA8311A7943011595CCD98859A" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D220C5C937E96FD9DBF5595CCD988588" xlink:to="loc_us-gaap_Assets_7898E4EA8311A7943011595CCD98859A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAbstract" xlink:label="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_81A3B6DE095ECD07C5D9595CCD9904CA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_UnearnedPremiums_81A3B6DE095ECD07C5D9595CCD9904CA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_31E0C7887E5FF1CEA5BA595CCD99D098" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_31E0C7887E5FF1CEA5BA595CCD99D098" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_27620B4A994DF2321CB0595CCD99E39F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_27620B4A994DF2321CB0595CCD99E39F" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_ED70B97F5B73B1DAF37D595CCD992D04" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_nmih_WarrantLiability_ED70B97F5B73B1DAF37D595CCD992D04" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_TaxesPayableCurrent" xlink:label="loc_us-gaap_TaxesPayableCurrent_511C33B48DDA1F82F15F595CCD99454D" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_TaxesPayableCurrent_511C33B48DDA1F82F15F595CCD99454D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_9F1B5F9DBD3A6ADC9FA3595CCD999EB1" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_DeferredTaxLiabilities_9F1B5F9DBD3A6ADC9FA3595CCD999EB1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_AC9D0D1176F1EE3052B9595CCD99C084" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_2193F44CAA6D1A6BACFA595CCD9972D1" xlink:to="loc_us-gaap_Liabilities_AC9D0D1176F1EE3052B9595CCD99C084" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_5F12EC0EC956A991CAD7595CCD993882" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_CommitmentsAndContingencies_5F12EC0EC956A991CAD7595CCD993882" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquityAbstract" xlink:label="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_BD21B5058E87929384BB595CCD9951D7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:to="loc_us-gaap_CommonStockValueOutstanding_BD21B5058E87929384BB595CCD9951D7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_B2E676EECD591B6F4B59595CCD99FE71" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:to="loc_us-gaap_AdditionalPaidInCapital_B2E676EECD591B6F4B59595CCD99FE71" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_D033FD7AD58B429F50A0595CCD99906F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_D033FD7AD58B429F50A0595CCD99906F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_632F59A11D23EC455291595CCD995A27" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_632F59A11D23EC455291595CCD995A27" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_2F8DF319C766A33B5829595CCD995F7D" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_3F5D625A1128357BCCD5595CCD99014A" xlink:to="loc_us-gaap_StockholdersEquity_2F8DF319C766A33B5829595CCD995F7D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_5E3CB0545CC4D90793BF595CCD9ADACE" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EB1E4CB82871B40A17F3595CCD97C9EF" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_5E3CB0545CC4D90793BF595CCD9ADACE" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_C00ADC2025D40574D54C7A464AD97578" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_StatementTable_C00ADC2025D40574D54C7A464AD97578" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_61F4C46C72C0FEEAE7F77A464AD99D7E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_C00ADC2025D40574D54C7A464AD97578" xlink:to="loc_us-gaap_StatementClassOfStockAxis_61F4C46C72C0FEEAE7F77A464AD99D7E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_61F4C46C72C0FEEAE7F77A464AD99D7E" xlink:to="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_61F4C46C72C0FEEAE7F77A464AD99D7E" xlink:to="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_0B3AD4C51077AF692C4F7A464AD9D750" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E" xlink:to="loc_us-gaap_CommonClassAMember_0B3AD4C51077AF692C4F7A464AD9D750" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_9AA5BA44ACC530EBC5FF7A464AD9C1CD" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_369066EAB0078D60FAEB7A464AD95D5E" xlink:to="loc_us-gaap_CommonClassBMember_9AA5BA44ACC530EBC5FF7A464AD9C1CD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_D8467B17FE759F022D137A464AD92525" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_D8467B17FE759F022D137A464AD92525" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_FB41085333BD0B1470717A464ADAD457" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_FB41085333BD0B1470717A464ADAD457" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesIssued" xlink:label="loc_us-gaap_CommonStockSharesIssued_666BD4BBF89EBBE0BA157A464ADA0402" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_CommonStockSharesIssued_666BD4BBF89EBBE0BA157A464ADA0402" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_2DA57D240F1641F3C4C67A464ADA5F0C" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_2DA57D240F1641F3C4C67A464ADA5F0C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesAuthorized" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_B0192803EEF418D306207A464ADA3CD0" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CD5517D8EA103FD6293A7A464AD9F511" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_B0192803EEF418D306207A464ADA3CD0" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquity" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_02A0BEFE46944F1AFBF885ED80381A58" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_A30682AB0BF28511485C85ED80365EC5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_02A0BEFE46944F1AFBF885ED80381A58" xlink:to="loc_us-gaap_StatementTable_A30682AB0BF28511485C85ED80365EC5" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_1DD7D2A5B55811C573C585ED803680CF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_A30682AB0BF28511485C85ED80365EC5" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_1DD7D2A5B55811C573C585ED803680CF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_1DD7D2A5B55811C573C585ED803680CF" xlink:to="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_1DD7D2A5B55811C573C585ED803680CF" xlink:to="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_C4C7E418576BB8B74D8E85ED80376ECC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:to="loc_us-gaap_CommonStockMember_C4C7E418576BB8B74D8E85ED80376ECC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_CE7CF42D8E65F86ECC5D85ED8037FCFE" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_CE7CF42D8E65F86ECC5D85ED8037FCFE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_68B37CE38C71A6B1AE7785ED8037CE55" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_68B37CE38C71A6B1AE7785ED8037CE55" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_CF517B82B7C8F435DE9185ED8038D9CA" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_5B91A851172E7E40A28885ED8036E32C" xlink:to="loc_us-gaap_RetainedEarningsMember_CF517B82B7C8F435DE9185ED8038D9CA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_71EB46BB69E7EADFDBEF85ED8038B3FD" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_A30682AB0BF28511485C85ED80365EC5" xlink:to="loc_us-gaap_StatementClassOfStockAxis_71EB46BB69E7EADFDBEF85ED8038B3FD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_71EB46BB69E7EADFDBEF85ED8038B3FD" xlink:to="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_71EB46BB69E7EADFDBEF85ED8038B3FD" xlink:to="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_FFA238BDD0B5007CD92E85ED80380760" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804" xlink:to="loc_us-gaap_CommonClassAMember_FFA238BDD0B5007CD92E85ED80380760" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_C8C749B1F5D17A8FFFF985ED80385C08" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_131A18B9507AA222649385ED80384804" xlink:to="loc_us-gaap_CommonClassBMember_C8C749B1F5D17A8FFFF985ED80385C08" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02A0BEFE46944F1AFBF885ED80381A58" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_56C130220A6F0DA13F8085ED803871F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_StockholdersEquity_56C130220A6F0DA13F8085ED803871F3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants" xlink:label="loc_us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants_ABAF48E04CA22D660D3685ED80388DA8" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants_ABAF48E04CA22D660D3685ED80388DA8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_6BDD50F5B56E83777FF685ED80385958" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_6BDD50F5B56E83777FF685ED80385958" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_FD6F71AD7E748896C82E85ED803848AD" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_FD6F71AD7E748896C82E85ED803848AD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueAcquisitions" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueAcquisitions_B1756A3F0AE60578A1D885ED80388C38" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueAcquisitions_B1756A3F0AE60578A1D885ED80388C38" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_76059908FBFD85EAD11B85ED80382BA1" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_76059908FBFD85EAD11B85ED80382BA1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_C552D66E04F17F5E92BA85ED8039632B" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_C552D66E04F17F5E92BA85ED8039632B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_B0747B5EAE1CAFE5A9A685ED8039A216" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3386AF602182CB3BA71985ED80386AC1" xlink:to="loc_us-gaap_NetIncomeLoss_B0747B5EAE1CAFE5A9A685ED8039A216" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_D8C14DC3DBE4CB16778285EDBED52F42" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:to="loc_us-gaap_StatementTable_D8C14DC3DBE4CB16778285EDBED52F42" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_2BBF85FD133BE17603CF85EDBED5FB31" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_D8C14DC3DBE4CB16778285EDBED52F42" xlink:to="loc_us-gaap_StatementClassOfStockAxis_2BBF85FD133BE17603CF85EDBED5FB31" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_919DB5676E4A717D897085EDBED6D8B9_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2BBF85FD133BE17603CF85EDBED5FB31" xlink:to="loc_us-gaap_ClassOfStockDomain_919DB5676E4A717D897085EDBED6D8B9_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_919DB5676E4A717D897085EDBED6D8B9" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2BBF85FD133BE17603CF85EDBED5FB31" xlink:to="loc_us-gaap_ClassOfStockDomain_919DB5676E4A717D897085EDBED6D8B9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_5876125A224251897E9185EDBED6B609" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_919DB5676E4A717D897085EDBED6D8B9" xlink:to="loc_us-gaap_CommonClassAMember_5876125A224251897E9185EDBED6B609" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_3749DE8F8C4AAC03288B85EDBED61C30" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_D8C14DC3DBE4CB16778285EDBED52F42" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_3749DE8F8C4AAC03288B85EDBED61C30" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_ABBFD91D7727B109098685EDBED62655_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_3749DE8F8C4AAC03288B85EDBED61C30" xlink:to="loc_us-gaap_EquityComponentDomain_ABBFD91D7727B109098685EDBED62655_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_ABBFD91D7727B109098685EDBED62655" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_3749DE8F8C4AAC03288B85EDBED61C30" xlink:to="loc_us-gaap_EquityComponentDomain_ABBFD91D7727B109098685EDBED62655" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_86D304339419FF9B6B4D85EDBED64936" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ABBFD91D7727B109098685EDBED62655" xlink:to="loc_us-gaap_CommonStockMember_86D304339419FF9B6B4D85EDBED64936" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsOfStockIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfStockIssuanceCosts_76A5AC20B80B203FCBAE85EDBED69E75" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:to="loc_us-gaap_PaymentsOfStockIssuanceCosts_76A5AC20B80B203FCBAE85EDBED69E75" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_EF0F20C4F95E5E60F5D285EDBED64A1F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_EF0F20C4F95E5E60F5D285EDBED64A1F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_C343F00B867CA3E2D02785EDBED6BC4E" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_C343F00B867CA3E2D02785EDBED6BC4E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_04790A587DB7E0CB89E185EDBED6E16C" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D0D14A5898E1A902B37C85EDBED6ABDE" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_04790A587DB7E0CB89E185EDBED6E16C" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_6CC7109955D70F18E2DC595CCD058D28" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_6CC7109955D70F18E2DC595CCD058D28" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_4F17B65A23018053967F595CCD052634" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_6CC7109955D70F18E2DC595CCD058D28" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_4F17B65A23018053967F595CCD052634" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_4F17B65A23018053967F595CCD052634" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_4F17B65A23018053967F595CCD052634" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_8D77AA978930A9B1B8FF595CCD05E566" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_8D77AA978930A9B1B8FF595CCD05E566" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_EAF6BFADDC17109576FB595CCD055337" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_EAF6BFADDC17109576FB595CCD055337" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_8918A3C307E056EB45DB595CCD052F55" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_8918A3C307E056EB45DB595CCD052F55" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_1DA9005D5E5ED6069F3F595CCD06F2BA" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_5C520EB3293DF1C2D442595CCD0565F3" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_1DA9005D5E5ED6069F3F595CCD06F2BA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_F2A1D65C6DED47E649A5595CCD06CCDD" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_6CC7109955D70F18E2DC595CCD058D28" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_F2A1D65C6DED47E649A5595CCD06CCDD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_82D93C1AEF600A9F793D595CCD066B60_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_F2A1D65C6DED47E649A5595CCD06CCDD" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_82D93C1AEF600A9F793D595CCD066B60_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_82D93C1AEF600A9F793D595CCD066B60" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_F2A1D65C6DED47E649A5595CCD06CCDD" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_82D93C1AEF600A9F793D595CCD066B60" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_9E31B29851EB531AD04D595CCD06F32B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_82D93C1AEF600A9F793D595CCD066B60" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_9E31B29851EB531AD04D595CCD06F32B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_35C4EC5E09E983C8B0FC595CCD068B3C" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_6CC7109955D70F18E2DC595CCD058D28" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_35C4EC5E09E983C8B0FC595CCD068B3C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_35C4EC5E09E983C8B0FC595CCD068B3C" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_35C4EC5E09E983C8B0FC595CCD068B3C" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_091CDA149A2DE164E408595CCD068ECD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_091CDA149A2DE164E408595CCD068ECD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_5070C023AD3237A1E8DF595CCD069C9E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_5070C023AD3237A1E8DF595CCD069C9E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_62381D529AFF8EB1E899595CCD06A4FE" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC82910F7BB11013A2D0595CCD060E7A" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_62381D529AFF8EB1E899595CCD06A4FE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_9DA8A34F84C0CE3E49C5595CCD063E65" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_us-gaap_AvailableForSaleSecurities_9DA8A34F84C0CE3E49C5595CCD063E65" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_47D2D444C4E72DB4AB82595CCD06E0DB" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_47D2D444C4E72DB4AB82595CCD06E0DB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetsFairValueDisclosure" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_EF1453B5ED7DF687943E595CCD06DF4A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_us-gaap_AssetsFairValueDisclosure_EF1453B5ED7DF687943E595CCD06DF4A" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_9A9B73D3874EA82B7145595CCD061B90" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_nmih_WarrantLiability_9A9B73D3874EA82B7145595CCD061B90" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_0053EC95B8CE9FB839D0595CCD069AB2" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_EDC80398EF452CD8F95C595CCD065EFD" xlink:to="loc_us-gaap_LiabilitiesFairValueDisclosure_0053EC95B8CE9FB839D0595CCD069AB2" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_A70D780133F7A533FBDD7A464A0560C3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_A70D780133F7A533FBDD7A464A0560C3" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByLiabilityClassAxis" xlink:label="loc_us-gaap_FairValueByLiabilityClassAxis_34AC25438C382FFE018B7A464A0531B9" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_A70D780133F7A533FBDD7A464A0560C3" xlink:to="loc_us-gaap_FairValueByLiabilityClassAxis_34AC25438C382FFE018B7A464A0531B9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_9AC434FC556E503B6FF07A464A05A87F_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_34AC25438C382FFE018B7A464A0531B9" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_9AC434FC556E503B6FF07A464A05A87F_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_9AC434FC556E503B6FF07A464A05A87F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_34AC25438C382FFE018B7A464A0531B9" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_9AC434FC556E503B6FF07A464A05A87F" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_WarrantLiabilityMember" xlink:label="loc_nmih_WarrantLiabilityMember_76E431416F73DF0C06AF7A464A058A14" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_9AC434FC556E503B6FF07A464A05A87F" xlink:to="loc_nmih_WarrantLiabilityMember_76E431416F73DF0C06AF7A464A058A14" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_17B6494E44BF7E8A9E357A464A0556C4" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_A70D780133F7A533FBDD7A464A0560C3" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_17B6494E44BF7E8A9E357A464A0556C4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4F18CDF8F8A4DA5BDBF47A464A0643B5_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_17B6494E44BF7E8A9E357A464A0556C4" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4F18CDF8F8A4DA5BDBF47A464A0643B5_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4F18CDF8F8A4DA5BDBF47A464A0643B5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_17B6494E44BF7E8A9E357A464A0556C4" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4F18CDF8F8A4DA5BDBF47A464A0643B5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_4FF37664F3F4CACDDE577A464A06E8F9" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4F18CDF8F8A4DA5BDBF47A464A0643B5" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_4FF37664F3F4CACDDE577A464A06E8F9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_DA7464B0EE7B6449BA457A464A06D2AC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_SharePrice_DA7464B0EE7B6449BA457A464A06D2AC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsRiskFreeInterestRate" xlink:label="loc_us-gaap_FairValueAssumptionsRiskFreeInterestRate_64256B07DF27A4242BCC7A464A06FB29" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_FairValueAssumptionsRiskFreeInterestRate_64256B07DF27A4242BCC7A464A06FB29" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedTerm" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedTerm_245B979E3E68C677386D7A464A06A772" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedTerm_245B979E3E68C677386D7A464A06A772" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedVolatilityRate" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedVolatilityRate_C74CE56D30122CA3FDFA7A464A066EDF" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedVolatilityRate_C74CE56D30122CA3FDFA7A464A066EDF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedDividendRate_91CE7D69934AFF8A2C707A464A06E7DA" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_6A0BC7A68BA79AFBFDCF7A464A063F2D" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedDividendRate_91CE7D69934AFF8A2C707A464A06E7DA" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_BF4DA72B38DCCCFD591F5CEECBE2AD5F" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_06159FAAADAFF8AB24135CEECBDD028C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_BF4DA72B38DCCCFD591F5CEECBE2AD5F" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_06159FAAADAFF8AB24135CEECBDD028C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_309D886EF1990DAE8B775CEECBDD5FC8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_06159FAAADAFF8AB24135CEECBDD028C" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_309D886EF1990DAE8B775CEECBDD5FC8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_356E5532E1DE3616EC1D5CEECBDD1D8D_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_309D886EF1990DAE8B775CEECBDD5FC8" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_356E5532E1DE3616EC1D5CEECBDD1D8D_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_356E5532E1DE3616EC1D5CEECBDD1D8D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_309D886EF1990DAE8B775CEECBDD5FC8" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_356E5532E1DE3616EC1D5CEECBDD1D8D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_6296293C37628A72186D5CEECBDD286F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_356E5532E1DE3616EC1D5CEECBDD1D8D" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_6296293C37628A72186D5CEECBDD286F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByLiabilityClassAxis" xlink:label="loc_us-gaap_FairValueByLiabilityClassAxis_B943BEAD76FDE87BFCCB5CEECBDD9F51" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_06159FAAADAFF8AB24135CEECBDD028C" xlink:to="loc_us-gaap_FairValueByLiabilityClassAxis_B943BEAD76FDE87BFCCB5CEECBDD9F51" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_E2F62A0750D917731B9C5CEECBE25B10_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_B943BEAD76FDE87BFCCB5CEECBDD9F51" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_E2F62A0750D917731B9C5CEECBE25B10_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_E2F62A0750D917731B9C5CEECBE25B10" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_B943BEAD76FDE87BFCCB5CEECBDD9F51" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_E2F62A0750D917731B9C5CEECBE25B10" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_WarrantLiabilityMember" xlink:label="loc_nmih_WarrantLiabilityMember_26F28326C13E043B8A8F5CEECBE2E095" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_E2F62A0750D917731B9C5CEECBE25B10" xlink:to="loc_nmih_WarrantLiabilityMember_26F28326C13E043B8A8F5CEECBE2E095" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_BF4DA72B38DCCCFD591F5CEECBE2AD5F" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_68C7F08CFDEAD8DF21185CEECBE35218" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_68C7F08CFDEAD8DF21185CEECBE35218" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_668F30C08906CB19D3D25CEECBE3CE34" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_668F30C08906CB19D3D25CEECBE3CE34" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_294A9C39F61A1880DE005CEECBE3EEE7" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_294A9C39F61A1880DE005CEECBE3EEE7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityIssues" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityIssues_D06D868D83216F1A898B5CEECBE38774" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_39296294ACC2BBF908F55CEECBE29A82" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityIssues_D06D868D83216F1A898B5CEECBE38774" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_2F3E00C4D36A6CF57A647A464B73C647" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:to="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_2F3E00C4D36A6CF57A647A464B73C647" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_5A0B9218E823DF21F22B7A464B737A6B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_2F3E00C4D36A6CF57A647A464B73C647" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_5A0B9218E823DF21F22B7A464B737A6B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F49E0200F5E893D204A97A464B73A6D3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_5A0B9218E823DF21F22B7A464B737A6B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F49E0200F5E893D204A97A464B73A6D3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F49E0200F5E893D204A97A464B73A6D3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_5A0B9218E823DF21F22B7A464B737A6B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F49E0200F5E893D204A97A464B73A6D3" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MACFinancialHoldingCorporationandSubsidiariesMember" xlink:label="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_84B452B89EE336F4DE3D7A464B73C097" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F49E0200F5E893D204A97A464B73A6D3" xlink:to="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_84B452B89EE336F4DE3D7A464B73C097" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_2EE71DB7FF32164B20657A464B737AA1" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_2F3E00C4D36A6CF57A647A464B73C647" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_2EE71DB7FF32164B20657A464B737AA1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_2EE71DB7FF32164B20657A464B737AA1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_2EE71DB7FF32164B20657A464B737AA1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_StateLicensesMember" xlink:label="loc_nmih_StateLicensesMember_370E7C76F4607DAA0E9B7A464B741CBD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151" xlink:to="loc_nmih_StateLicensesMember_370E7C76F4607DAA0E9B7A464B741CBD" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_GSEApprovalsMember" xlink:label="loc_nmih_GSEApprovalsMember_E0F6C0E1BAA382529DC77A464B74FA8B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_5335BE7E0F37359207497A464B732151" xlink:to="loc_nmih_GSEApprovalsMember_E0F6C0E1BAA382529DC77A464B74FA8B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_16CBF631F61B999B16CB7A464B742C9B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:to="loc_us-gaap_Goodwill_16CBF631F61B999B16CB7A464B742C9B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_97D97F807D65477991E27A464B74B91D" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_97D97F807D65477991E27A464B74B91D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_38FEB71E628FA9F381727A464B746293" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_38FEB71E628FA9F381727A464B746293" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_2B6626743558349438047A464B74ACEB" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_5A7DD67ACD693E1C39A37A464B74F221" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_2B6626743558349438047A464B74ACEB" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/Investments" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_067B760F9496976723505CEECC217DE7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_067B760F9496976723505CEECC217DE7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_A51B8F416F4471BC2DC85CEECC215030" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_067B760F9496976723505CEECC217DE7" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_A51B8F416F4471BC2DC85CEECC215030" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_A51B8F416F4471BC2DC85CEECC215030" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_A51B8F416F4471BC2DC85CEECC215030" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_A021FB30B96F8277327A5CEECC27E0E4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_A021FB30B96F8277327A5CEECC27E0E4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_0F90F15F01F6A84CA6415CEECC27FC75" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_0F90F15F01F6A84CA6415CEECC27FC75" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_4BDF89C9E6A3D67574B25CEECC27FEB8" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_4BDF89C9E6A3D67574B25CEECC27FEB8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_E300386EA091D1ECA7F25CEECC27CD1A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_490F87E5645E2C8194665CEECC215708" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_E300386EA091D1ECA7F25CEECC27CD1A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_87CDC5C04B9B0358FDA75CEECC273CDC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_87CDC5C04B9B0358FDA75CEECC273CDC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_0230C1665A8481DFD2535CEECC273BFB" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_0230C1665A8481DFD2535CEECC273BFB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_940B43201CDAD2F107245CEECC271FDD" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_940B43201CDAD2F107245CEECC271FDD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_AAA05860F638E9932E625CEECC27B771" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D49BE0CF0A39CF2475A85CEECC2716BB" xlink:to="loc_us-gaap_AvailableForSaleSecurities_AAA05860F638E9932E625CEECC27B771" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B01D9E9F6FB6F82FC8A27D76821F6A6B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B01D9E9F6FB6F82FC8A27D76821F6A6B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_BD785D28C010D2DF31C27D76821F48D6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B01D9E9F6FB6F82FC8A27D76821F6A6B" xlink:to="loc_us-gaap_RangeAxis_BD785D28C010D2DF31C27D76821F48D6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_BD785D28C010D2DF31C27D76821F48D6" xlink:to="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_BD785D28C010D2DF31C27D76821F48D6" xlink:to="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_9FB972B9A7588E4EFDD27D768220CEA1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451" xlink:to="loc_us-gaap_MinimumMember_9FB972B9A7588E4EFDD27D768220CEA1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_CF7CCCC8E27CCB9AAA897D768220A39D" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_6CA5947593E556522F387D768220F451" xlink:to="loc_us-gaap_MaximumMember_CF7CCCC8E27CCB9AAA897D768220A39D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_CreditRatingSourceAxis" xlink:label="loc_invest_CreditRatingSourceAxis_5C6E63F1E74F3B6DA36B7D7682253279" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B01D9E9F6FB6F82FC8A27D76821F6A6B" xlink:to="loc_invest_CreditRatingSourceAxis_5C6E63F1E74F3B6DA36B7D7682253279" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_CreditRatingSourceDomain" xlink:label="loc_invest_CreditRatingSourceDomain_8C7B9E428235C8AB54C47D76822559EF_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_invest_CreditRatingSourceAxis_5C6E63F1E74F3B6DA36B7D7682253279" xlink:to="loc_invest_CreditRatingSourceDomain_8C7B9E428235C8AB54C47D76822559EF_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_CreditRatingSourceDomain" xlink:label="loc_invest_CreditRatingSourceDomain_8C7B9E428235C8AB54C47D76822559EF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_invest_CreditRatingSourceAxis_5C6E63F1E74F3B6DA36B7D7682253279" xlink:to="loc_invest_CreditRatingSourceDomain_8C7B9E428235C8AB54C47D76822559EF" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_BBBRatingMember" xlink:label="loc_nmih_BBBRatingMember_15570BC45EB63A46D92A7D7682263365" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_invest_CreditRatingSourceDomain_8C7B9E428235C8AB54C47D76822559EF" xlink:to="loc_nmih_BBBRatingMember_15570BC45EB63A46D92A7D7682263365" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_72825835095C37D2AED47D7682263E50" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B01D9E9F6FB6F82FC8A27D76821F6A6B" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_72825835095C37D2AED47D7682263E50" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_797837301C1A32811B5D7D7682264DE6_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_72825835095C37D2AED47D7682263E50" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_797837301C1A32811B5D7D7682264DE6_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_797837301C1A32811B5D7D7682264DE6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_72825835095C37D2AED47D7682263E50" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_797837301C1A32811B5D7D7682264DE6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_4BDC040559E931B8AF0F7D768226AC92" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_797837301C1A32811B5D7D7682264DE6" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_4BDC040559E931B8AF0F7D768226AC92" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMinimum" xlink:label="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMinimum_2A7D33A4FFD0AB37188B7D768226954B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMinimum_2A7D33A4FFD0AB37188B7D768226954B" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMaximum" xlink:label="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMaximum_8A1D753AD688B1DE2B247D768226E72A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsRangeMaximum_8A1D753AD688B1DE2B247D768226E72A" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_InvestmentPortfolioTargetInvestmentAllocationsActual" xlink:label="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsActual_8FE7484DA768D542F9FD7D76822605A5" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_nmih_InvestmentPortfolioTargetInvestmentAllocationsActual_8FE7484DA768D542F9FD7D76822605A5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_3354E2DF1576F7EE30537D76822623C4" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_3354E2DF1576F7EE30537D76822623C4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_430A229450D59EC2CFDB7D7682271E34" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_430A229450D59EC2CFDB7D7682271E34" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashCashEquivalentsAndShortTermInvestments" xlink:label="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_4E2DA7AEAAC73EA8A07D7D768227E15D" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_B9A9DC3C1E6FE4584ACF7D768226BA24" xlink:to="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_4E2DA7AEAAC73EA8A07D7D768227E15D" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_0F7134B8749E825032447A464AE95FB1" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_7683501F34C9FD13CB697A464AE95B02" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_0F7134B8749E825032447A464AE95FB1" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_7683501F34C9FD13CB697A464AE95B02" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:label="loc_us-gaap_InvestmentTypeAxis_0B130CF854DE15C819477A464AE951F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_7683501F34C9FD13CB697A464AE95B02" xlink:to="loc_us-gaap_InvestmentTypeAxis_0B130CF854DE15C819477A464AE951F3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InvestmentTypeAxis_0B130CF854DE15C819477A464AE951F3" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InvestmentTypeAxis_0B130CF854DE15C819477A464AE951F3" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FixedMaturitiesMember" xlink:label="loc_us-gaap_FixedMaturitiesMember_ADB56CCC784E98E470217A464AE99067" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C" xlink:to="loc_us-gaap_FixedMaturitiesMember_ADB56CCC784E98E470217A464AE99067" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsMember" xlink:label="loc_us-gaap_CashAndCashEquivalentsMember_34A432789139A0467C477A464AE9F9BF" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_CDE672433DF5C3AC1C5E7A464AE9943C" xlink:to="loc_us-gaap_CashAndCashEquivalentsMember_34A432789139A0467C477A464AE9F9BF" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_InvestmentIncomeGross" xlink:label="loc_nmih_InvestmentIncomeGross_8F0C98B147F825B4BB317A464AE97CE1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_0F7134B8749E825032447A464AE95FB1" xlink:to="loc_nmih_InvestmentIncomeGross_8F0C98B147F825B4BB317A464AE97CE1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_90BA5A14353FC6B12B7A7A464AE9FDC4" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_0F7134B8749E825032447A464AE95FB1" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_90BA5A14353FC6B12B7A7A464AE9FDC4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_EFD7846241904D49250C7A464AE95976" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_0F7134B8749E825032447A464AE95FB1" xlink:to="loc_us-gaap_InvestmentIncomeNet_EFD7846241904D49250C7A464AE95976" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_BE9F880057FA9009BF1261FC421EBF99" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_255B6EF6CA3596DC282061FC421D5F85" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_BE9F880057FA9009BF1261FC421EBF99" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_255B6EF6CA3596DC282061FC421D5F85" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_0AF232905C4EFF90E7E461FC421DC274" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_255B6EF6CA3596DC282061FC421D5F85" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_0AF232905C4EFF90E7E461FC421DC274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_0AF232905C4EFF90E7E461FC421DC274" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_0AF232905C4EFF90E7E461FC421DC274" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_3F1E62FE8061B100E99461FC421DEE4C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_3F1E62FE8061B100E99461FC421DEE4C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_D83F0649A4DFF83091CA61FC421ECA94" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_D83F0649A4DFF83091CA61FC421ECA94" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_5AD03796F8C227C5218A61FC421ED8A9" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_AD5647353F3D6456C66A61FC421D8886" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_5AD03796F8C227C5218A61FC421ED8A9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_65AA7963A2D96427CBE361FC421E0EAD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_BE9F880057FA9009BF1261FC421EBF99" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_65AA7963A2D96427CBE361FC421E0EAD" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_11F47D8A79B5FF6FA1DD7A464B3A40BE" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_6A8C11E0511D479F80D77A464B3AB7EE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_11F47D8A79B5FF6FA1DD7A464B3A40BE" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_6A8C11E0511D479F80D77A464B3AB7EE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_00E76F798C687E87E3777A464B3AD6FB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_6A8C11E0511D479F80D77A464B3AB7EE" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_00E76F798C687E87E3777A464B3AD6FB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_00E76F798C687E87E3777A464B3AD6FB" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_00E76F798C687E87E3777A464B3AD6FB" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_A74D94A626734BB41F5E7A464B3AA86E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_A74D94A626734BB41F5E7A464B3AA86E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BondsMember" xlink:label="loc_us-gaap_BondsMember_C10221C3E11EEE6A5C167A464B3A7F79" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_7D985E254488787DDA537A464B3A53BD" xlink:to="loc_us-gaap_BondsMember_C10221C3E11EEE6A5C167A464B3A7F79" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_11F47D8A79B5FF6FA1DD7A464B3A40BE" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_854640D342E408B4E2667A464B3AC853" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_854640D342E408B4E2667A464B3AC853" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_433BBE8DA7DFE8BE4C307A464B3A835C" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_433BBE8DA7DFE8BE4C307A464B3A835C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_D18D33E98803AE39E7A47A464B3AEEE4" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_D18D33E98803AE39E7A47A464B3AEEE4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_3C09D26830FE441B55D07A464B3AE16E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_3C09D26830FE441B55D07A464B3AE16E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_B0A6907FD30940408D5B7A464B3B7B03" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_546B8DC79837477E0F067A464B3A8FCA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_B0A6907FD30940408D5B7A464B3B7B03" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_11F47D8A79B5FF6FA1DD7A464B3A40BE" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_D34D7E94E87C5167ADB77A464B3B587B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_D34D7E94E87C5167ADB77A464B3B587B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6ED9C87157B50EFC34F47A464B3B0310" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6ED9C87157B50EFC34F47A464B3B0310" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_009B3EFBBCAB80AD6D157A464B3BBA14" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_009B3EFBBCAB80AD6D157A464B3BBA14" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_11962D7AADE88B1694437A464B3B930E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_11962D7AADE88B1694437A464B3B930E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_9F23AA9C7FB54832D7CB7A464B3BEF0E" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_6C599ED5BF3899B400AA7A464B3BF6BC" xlink:to="loc_us-gaap_AvailableForSaleSecurities_9F23AA9C7FB54832D7CB7A464B3BEF0E" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_18B4F85F330D981352715CEECC073988" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_18B4F85F330D981352715CEECC073988" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_52A286302BF58F9FEEF55CEECC070EF3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_18B4F85F330D981352715CEECC073988" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_52A286302BF58F9FEEF55CEECC070EF3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_52A286302BF58F9FEEF55CEECC070EF3" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_52A286302BF58F9FEEF55CEECC070EF3" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_6312E78C67DDEC821B5D5CEECC072815" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_6312E78C67DDEC821B5D5CEECC072815" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_F305F42EDA9A54AECE765CEECC0765BB" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_F305F42EDA9A54AECE765CEECC0765BB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_BD3A40EDA81CD9DDB3C85CEECC08BF8E" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_BD3A40EDA81CD9DDB3C85CEECC08BF8E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_B462C61B175BEB18C4FF5CEECC086757" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_A1E8E75C95B2366E91FB5CEECC0733A5" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_B462C61B175BEB18C4FF5CEECC086757" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_333B40DD33969EF11C3D5CEECC087BFD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_333B40DD33969EF11C3D5CEECC087BFD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_ABC941D9D35B744B45015CEECC080CD2" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_ABC941D9D35B744B45015CEECC080CD2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_34A65CA40D977FDB3BE25CEECC0800A9" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_34A65CA40D977FDB3BE25CEECC0800A9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_A5B22D02B38160B574655CEECC08221B" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_A5B22D02B38160B574655CEECC08221B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_25BA4C02D51010BEB9765CEECC08A017" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_25BA4C02D51010BEB9765CEECC08A017" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_D3AA9B3E560FA8DE12B65CEECC080492" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_D3AA9B3E560FA8DE12B65CEECC080492" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_4EB4724CD7D0F5EBB4575CEECC08B66F" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_4EB4724CD7D0F5EBB4575CEECC08B66F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_809D1045EB0D00712D215CEECC08B839" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_809D1045EB0D00712D215CEECC08B839" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_7147A335FB44428339385CEECC0D84E6" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_6CF13F687ACB97F85CF35CEECC081946" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_7147A335FB44428339385CEECC0D84E6" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/Litigation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_92933ADBCDAC37A3110C61FC42399B0D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:to="loc_dei_LegalEntityAxis_92933ADBCDAC37A3110C61FC42399B0D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_92933ADBCDAC37A3110C61FC42399B0D" xlink:to="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_92933ADBCDAC37A3110C61FC42399B0D" xlink:to="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_914BA198222C95234C1061FC42392407" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260" xlink:to="loc_nmih_NMicandReoneCombinedMember_914BA198222C95234C1061FC42392407" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NationalMortgageInsuranceCorporationMember" xlink:label="loc_nmih_NationalMortgageInsuranceCorporationMember_BFD5E9E38E11E70DCD6661FC4239509E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_63C466ED35F6A2D4C50561FC4239C260" xlink:to="loc_nmih_NationalMortgageInsuranceCorporationMember_BFD5E9E38E11E70DCD6661FC4239509E" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockAxis" xlink:label="loc_nmih_SaleofStockAxis_8D3BCB7CD7BB6AC99D2561FC423AF97E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:to="loc_nmih_SaleofStockAxis_8D3BCB7CD7BB6AC99D2561FC423AF97E" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_835DA5DBD174F1312AA761FC423A4470_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_nmih_SaleofStockAxis_8D3BCB7CD7BB6AC99D2561FC423AF97E" xlink:to="loc_nmih_SaleofStockDomain_835DA5DBD174F1312AA761FC423A4470_default" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_835DA5DBD174F1312AA761FC423A4470" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_nmih_SaleofStockAxis_8D3BCB7CD7BB6AC99D2561FC423AF97E" xlink:to="loc_nmih_SaleofStockDomain_835DA5DBD174F1312AA761FC423A4470" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IPOMember" xlink:label="loc_us-gaap_IPOMember_046837D1AAE22079974B61FC423AD40E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_SaleofStockDomain_835DA5DBD174F1312AA761FC423A4470" xlink:to="loc_us-gaap_IPOMember_046837D1AAE22079974B61FC423AD40E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_055FD9D8E5224517B5CA61FC423A88EF" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:to="loc_us-gaap_StatementClassOfStockAxis_055FD9D8E5224517B5CA61FC423A88EF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_35676CE08E36A7E7EA5B61FC423AD759_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_055FD9D8E5224517B5CA61FC423A88EF" xlink:to="loc_us-gaap_ClassOfStockDomain_35676CE08E36A7E7EA5B61FC423AD759_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_35676CE08E36A7E7EA5B61FC423AD759" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_055FD9D8E5224517B5CA61FC423A88EF" xlink:to="loc_us-gaap_ClassOfStockDomain_35676CE08E36A7E7EA5B61FC423AD759" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_9925CB64ABCF856B081861FC423A0D72" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_35676CE08E36A7E7EA5B61FC423AD759" xlink:to="loc_us-gaap_CommonClassAMember_9925CB64ABCF856B081861FC423A0D72" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_2535663C61595C822CC261FC423A958F" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_C967721FCDA5FD6ECBB161FC423935D1" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_2535663C61595C822CC261FC423A958F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_62A8C3C5E913AD06E47C61FC423A464D_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_2535663C61595C822CC261FC423A958F" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_62A8C3C5E913AD06E47C61FC423A464D_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_62A8C3C5E913AD06E47C61FC423A464D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_2535663C61595C822CC261FC423A958F" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_62A8C3C5E913AD06E47C61FC423A464D" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MACFinancialHoldingCorporationandSubsidiariesMember" xlink:label="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_2FE20E1188450A000D2561FC423A543A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_62A8C3C5E913AD06E47C61FC423A464D" xlink:to="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_2FE20E1188450A000D2561FC423A543A" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForcePrimary" xlink:label="loc_nmih_MortgageInsuranceinForcePrimary_5C0920EF870DACE442D861FC423A48E3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_MortgageInsuranceinForcePrimary_5C0920EF870DACE442D861FC423A48E3" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForcePool" xlink:label="loc_nmih_MortgageInsuranceinForcePool_1E0FB5216A4338A36CB861FC423A2459" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_MortgageInsuranceinForcePool_1E0FB5216A4338A36CB861FC423A2459" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RiskinForcePrimary" xlink:label="loc_nmih_RiskinForcePrimary_41D9D8AC2DA917854ABD61FC423A08BC" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_RiskinForcePrimary_41D9D8AC2DA917854ABD61FC423A08BC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForceGrossPool" xlink:label="loc_nmih_MortgageInsuranceinForceGrossPool_06D7B656F90AFCA7250F61FC423A3CB6" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_MortgageInsuranceinForceGrossPool_06D7B656F90AFCA7250F61FC423A3CB6" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable" xlink:label="loc_nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable_5AE3A63A5AB0441EC12261FC423AEAA9" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable_5AE3A63A5AB0441EC12261FC423AEAA9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_ED9D562493AF3B11E45561FC423A0A5E" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_ED9D562493AF3B11E45561FC423A0A5E" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_BusinessCombinationConsiderationTransferredTaxLiabilitiesIncurred" xlink:label="loc_nmih_BusinessCombinationConsiderationTransferredTaxLiabilitiesIncurred_5EC39AB648A85D7EEC4661FC423AF555" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_BusinessCombinationConsiderationTransferredTaxLiabilitiesIncurred_5EC39AB648A85D7EEC4661FC423AF555" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_05C37FAD77365D4918CB61FC423A52B3" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_05C37FAD77365D4918CB61FC423A52B3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_7EF09ECE5BE79A0B0BA661FC423AB7D8" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_SharePrice_7EF09ECE5BE79A0B0BA661FC423AB7D8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_8B5691B63A0FD772AD5B61FC423A0659" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_8B5691B63A0FD772AD5B61FC423A0659" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage" xlink:label="loc_nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage_B28B9BC0B13E15E0CD6B61FC423A6B8D" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_StockIssuedDuringPeriodUnderwritingFeeandOtherOfferingExpensePercentage_B28B9BC0B13E15E0CD6B61FC423A6B8D" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_ProceedsfromIssuanceInitialPublicOfferingNet" xlink:label="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_7FB3F647486CAFC4B85261FC423B16F2" xlink:type="locator" />
    <definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_7FB3F647486CAFC4B85261FC423B16F2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusRequired" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusRequired_E80C83F0A83F9CD1C76761FC423B596D" xlink:type="locator" />
    <definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusRequired_E80C83F0A83F9CD1C76761FC423B596D" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum" xlink:label="loc_nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum_C6F9F6473D356B16BC7761FC423B5393" xlink:type="locator" />
    <definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum_C6F9F6473D356B16BC7761FC423B5393" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_CashContributionFromParentToSubsidiary" xlink:label="loc_nmih_CashContributionFromParentToSubsidiary_A1FC277CF4FC050D006361FC423BD562" xlink:type="locator" />
    <definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_nmih_CashContributionFromParentToSubsidiary_A1FC277CF4FC050D006361FC423BD562" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NumberOfStatesInWhichEntityOperates" xlink:label="loc_us-gaap_NumberOfStatesInWhichEntityOperates_78687109E35B9FBFC40C61FC423B4318" xlink:type="locator" />
    <definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_NumberOfStatesInWhichEntityOperates_78687109E35B9FBFC40C61FC423B4318" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_83A8F447CD98C9CE47EF61FC423BD1A5" xlink:type="locator" />
    <definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_83A8F447CD98C9CE47EF61FC423BD1A5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_276CF89F0C7E6733A71261FC423B60C6" xlink:type="locator" />
    <definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CB12F12F994F6F0405D461FC423ADF60" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_276CF89F0C7E6733A71261FC423B60C6" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VestingAxis" xlink:label="loc_us-gaap_VestingAxis_98C1AEA485B37D5B9E6E7DB4E7FF3A27" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:to="loc_us-gaap_VestingAxis_98C1AEA485B37D5B9E6E7DB4E7FF3A27" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VestingDomain" xlink:label="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VestingAxis_98C1AEA485B37D5B9E6E7DB4E7FF3A27" xlink:to="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VestingDomain" xlink:label="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VestingAxis_98C1AEA485B37D5B9E6E7DB4E7FF3A27" xlink:to="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SubjecttoMarketandServiceConditionsMember" xlink:label="loc_nmih_SubjecttoMarketandServiceConditionsMember_4A83245A2B99477FCBE17DB4E7FFE67E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620" xlink:to="loc_nmih_SubjecttoMarketandServiceConditionsMember_4A83245A2B99477FCBE17DB4E7FFE67E" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SubjecttoServiceConditionsMember" xlink:label="loc_nmih_SubjecttoServiceConditionsMember_C94C415A86AB3A1D4FF87DB4E7FF86FE" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_A0E009407539E57495C87DB4E7FF7620" xlink:to="loc_nmih_SubjecttoServiceConditionsMember_C94C415A86AB3A1D4FF87DB4E7FF86FE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_BE8B383605B31F9C66447DB4E7FF8E58" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:to="loc_us-gaap_RangeAxis_BE8B383605B31F9C66447DB4E7FF8E58" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_BE8B383605B31F9C66447DB4E7FF8E58" xlink:to="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_BE8B383605B31F9C66447DB4E7FF8E58" xlink:to="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_FC124DD774C65633C76C7DB4E7FF95B5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674" xlink:to="loc_us-gaap_MinimumMember_FC124DD774C65633C76C7DB4E7FF95B5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_387C55CE9F2FE1B42C387DB4E7FFE962" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E21E7671548FCFF59C437DB4E7FF3674" xlink:to="loc_us-gaap_MaximumMember_387C55CE9F2FE1B42C387DB4E7FFE962" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_F510C4C8ED4202B0BA817DB4E7FF373D" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:to="loc_us-gaap_PlanNameAxis_F510C4C8ED4202B0BA817DB4E7FF373D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_F510C4C8ED4202B0BA817DB4E7FF373D" xlink:to="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_F510C4C8ED4202B0BA817DB4E7FF373D" xlink:to="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_2D9FDAFE9EEAE04A84D27DB4E7FF0BDE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2" xlink:to="loc_nmih_The2012StockIncentivePlanMember_2D9FDAFE9EEAE04A84D27DB4E7FF0BDE" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_TwoThousandFourteenOmnibusIncentivePlanMember" xlink:label="loc_nmih_TwoThousandFourteenOmnibusIncentivePlanMember_043798D83E8464F52D707DB4E800FA3B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_01038F804BB39254065A7DB4E7FFB8D2" xlink:to="loc_nmih_TwoThousandFourteenOmnibusIncentivePlanMember_043798D83E8464F52D707DB4E800FA3B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_BB98F23D4048780D51167DB4E80057BD" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_51DA76B5A183AE1C66F87DB4E7FF13F0" xlink:to="loc_us-gaap_AwardTypeAxis_BB98F23D4048780D51167DB4E80057BD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7D38C2A347077700BC5F7DB4E800F9B3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_BB98F23D4048780D51167DB4E80057BD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7D38C2A347077700BC5F7DB4E800F9B3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7D38C2A347077700BC5F7DB4E800F9B3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_BB98F23D4048780D51167DB4E80057BD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7D38C2A347077700BC5F7DB4E800F9B3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_AB3B6993A3915EF7FEEA7DB4E800EDBC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7D38C2A347077700BC5F7DB4E800F9B3" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_AB3B6993A3915EF7FEEA7DB4E800EDBC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_D97C90A9F1F11C1A7F787DB4E800A0D1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_D97C90A9F1F11C1A7F787DB4E800A0D1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber_565DB8A0C7A287CFE7FB7DB4E800DC73" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber_565DB8A0C7A287CFE7FB7DB4E800DC73" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice_E20D1883EB0B300B17D57DB4E80024E3" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice_E20D1883EB0B300B17D57DB4E80024E3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1_40E650540C113B2CF8637DB4E8002A98" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1_40E650540C113B2CF8637DB4E8002A98" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue_0D857BE52DBFBEEF35067DB4E8004C73" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue_0D857BE52DBFBEEF35067DB4E8004C73" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_239712B199BBBB441EE17DB4E80005BA" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_239712B199BBBB441EE17DB4E80005BA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_3D0C2F50BA70249AC4227DB4E800CEE6" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_3D0C2F50BA70249AC4227DB4E800CEE6" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PresentValueOfAnticipatedDividends" xlink:label="loc_nmih_PresentValueOfAnticipatedDividends_0F3C598A9E68301A147C7DC94FA97FC7" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_nmih_PresentValueOfAnticipatedDividends_0F3C598A9E68301A147C7DC94FA97FC7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_D67D1939CD54E0E903B77DB4E800BA32" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_032FDD9C90136471823F7DB4E80007A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_D67D1939CD54E0E903B77DB4E800BA32" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_C06AC137FECC72BF3FDC7D7680986503" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_E28C3E928506CF1F74737D7680974AE2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_C06AC137FECC72BF3FDC7D7680986503" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_E28C3E928506CF1F74737D7680974AE2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_52964B8311E3FB668A657D7680977A9E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_E28C3E928506CF1F74737D7680974AE2" xlink:to="loc_us-gaap_PlanNameAxis_52964B8311E3FB668A657D7680977A9E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_24D709DFFC88D828FE157D768097FC6B_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_52964B8311E3FB668A657D7680977A9E" xlink:to="loc_us-gaap_PlanNameDomain_24D709DFFC88D828FE157D768097FC6B_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_24D709DFFC88D828FE157D768097FC6B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_52964B8311E3FB668A657D7680977A9E" xlink:to="loc_us-gaap_PlanNameDomain_24D709DFFC88D828FE157D768097FC6B" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_A6E0EDE2924BA3DA06DD7D768097AF5E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_24D709DFFC88D828FE157D768097FC6B" xlink:to="loc_nmih_The2012StockIncentivePlanMember_A6E0EDE2924BA3DA06DD7D768097AF5E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_21A8A60BFB088D8961CE7D76809854A5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_E28C3E928506CF1F74737D7680974AE2" xlink:to="loc_us-gaap_AwardTypeAxis_21A8A60BFB088D8961CE7D76809854A5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_23AC9A93FF1014C397107D768098E3C8_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_21A8A60BFB088D8961CE7D76809854A5" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_23AC9A93FF1014C397107D768098E3C8_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_23AC9A93FF1014C397107D768098E3C8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_21A8A60BFB088D8961CE7D76809854A5" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_23AC9A93FF1014C397107D768098E3C8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_50C4FAA93285BBD45FFB7D768098D910" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_23AC9A93FF1014C397107D768098E3C8" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_50C4FAA93285BBD45FFB7D768098D910" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_C06AC137FECC72BF3FDC7D7680986503" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6D55A346DE62DDD5252D7D768099CF6B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6D55A346DE62DDD5252D7D768099CF6B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_159C20BB288F79F794AA7D76809978FF" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_159C20BB288F79F794AA7D76809978FF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_1808A8039CAF06F6477C7D7680994B6B" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_1808A8039CAF06F6477C7D7680994B6B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_881202B4A986C79456867D7680999282" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_C137E3768CE849FE41697D7680988C72" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_881202B4A986C79456867D7680999282" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_C06AC137FECC72BF3FDC7D7680986503" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_A290BFBC8C52019690357D768099E713" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_A290BFBC8C52019690357D768099E713" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_EB2CA63E50B14B2B61EA7D76809912C9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_EB2CA63E50B14B2B61EA7D76809912C9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_3706B5917831FBED98537D76809A23A7" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_3706B5917831FBED98537D76809A23A7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_32C7173E917A56ADDD267D76809AE46A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_4A62E3DE800C5AED0DC27D7680995B58" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_32C7173E917A56ADDD267D76809AE46A" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_0826065B7BD11EB663617BCB3FA0A4A9" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2B27496A515E6A3A91217BCB3FA0854F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_0826065B7BD11EB663617BCB3FA0A4A9" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2B27496A515E6A3A91217BCB3FA0854F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_276BF1B7805B8AE97E737BCB3FA02E5F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_2B27496A515E6A3A91217BCB3FA0854F" xlink:to="loc_us-gaap_PlanNameAxis_276BF1B7805B8AE97E737BCB3FA02E5F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_5FE0E6750C4A9DAC38AE7BCB3FA031AC_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_276BF1B7805B8AE97E737BCB3FA02E5F" xlink:to="loc_us-gaap_PlanNameDomain_5FE0E6750C4A9DAC38AE7BCB3FA031AC_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_5FE0E6750C4A9DAC38AE7BCB3FA031AC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_276BF1B7805B8AE97E737BCB3FA02E5F" xlink:to="loc_us-gaap_PlanNameDomain_5FE0E6750C4A9DAC38AE7BCB3FA031AC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_1FF42E23B9B238F4F9587BCB3FA0B740" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_5FE0E6750C4A9DAC38AE7BCB3FA031AC" xlink:to="loc_nmih_The2012StockIncentivePlanMember_1FF42E23B9B238F4F9587BCB3FA0B740" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_0826065B7BD11EB663617BCB3FA0A4A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_7494967C269177763A3D7BCB3FA091CF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_7494967C269177763A3D7BCB3FA091CF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_ED32083E5653A737FB397BCB3FA057A0" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_ED32083E5653A737FB397BCB3FA057A0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_F06B7CA3DBF2A45AD5057BCB3FA160E5" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_F06B7CA3DBF2A45AD5057BCB3FA160E5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_11E7326E9B1B983EFA927BCB3FA117C8" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_3037AF535D380DBFD4197BCB3FA005E4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_11E7326E9B1B983EFA927BCB3FA117C8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_0826065B7BD11EB663617BCB3FA0A4A9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_9480BBAD4601569943787BCB3FA13166" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_9480BBAD4601569943787BCB3FA13166" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_73E1DFD3957DF6C9DCB17BCB3FA1AFC5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_73E1DFD3957DF6C9DCB17BCB3FA1AFC5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_E2DD06BE826B93E509D27BCB3FA1DA06" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_E2DD06BE826B93E509D27BCB3FA1DA06" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_9A34AA76B1FF01E1C8A67BCB3FA14736" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_ED709EAE2DE5CDFC76DB7BCB3FA13E98" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_9A34AA76B1FF01E1C8A67BCB3FA14736" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_0826065B7BD11EB663617BCB3FA0A4A9" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue_6D6C5EA7AA65678069D87BCB3FA145D6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue_6D6C5EA7AA65678069D87BCB3FA145D6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_C0BDD26DD061772D96647BCB3FA1644E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_C0BDD26DD061772D96647BCB3FA1644E" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue_FB903C17AAF284AA75617BCB3FA1BABB" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue_FB903C17AAF284AA75617BCB3FA1BABB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue_D01A83E1A5FBCE27CE637BCB3FA1235F" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_84532DFDCB13CB2663B27BCB3FA1323A" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue_D01A83E1A5FBCE27CE637BCB3FA1235F" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_E9C79B080E008C387D7A7A464B05D747" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_A1CC18D6D3E28DB496A57A464AFF18BE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_E9C79B080E008C387D7A7A464B05D747" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_A1CC18D6D3E28DB496A57A464AFF18BE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_28353CE45F70555012B47A464B00CA3B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_A1CC18D6D3E28DB496A57A464AFF18BE" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_28353CE45F70555012B47A464B00CA3B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_28353CE45F70555012B47A464B00CA3B" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_28353CE45F70555012B47A464B00CA3B" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SoftwareAndSoftwareDevelopmentCostsMember" xlink:label="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_ECA42D0B4E4FEEF9652F7A464B0047D0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19" xlink:to="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_ECA42D0B4E4FEEF9652F7A464B0047D0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquipmentMember" xlink:label="loc_us-gaap_EquipmentMember_A724287352EA6E42AD127A464B00558E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19" xlink:to="loc_us-gaap_EquipmentMember_A724287352EA6E42AD127A464B00558E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LeaseholdImprovementsMember" xlink:label="loc_us-gaap_LeaseholdImprovementsMember_A1C79B1498F6CF8CE43C7A464B00A3D6" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C2C489CD48EC44A4201D7A464B00FC19" xlink:to="loc_us-gaap_LeaseholdImprovementsMember_A1C79B1498F6CF8CE43C7A464B00A3D6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_18551018BF00B213B0407A464B058B3A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_E9C79B080E008C387D7A7A464B05D747" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_18551018BF00B213B0407A464B058B3A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_3978958E8613E17573367A464B05139E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_E9C79B080E008C387D7A7A464B05D747" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_3978958E8613E17573367A464B05139E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_846924EE8398F59AE3A37A464B0584B4" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_E9C79B080E008C387D7A7A464B05D747" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_846924EE8398F59AE3A37A464B0584B4" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SignificantAcquisitionsAndDisposalsLineItems" xlink:label="loc_us-gaap_SignificantAcquisitionsAndDisposalsLineItems_42D32C9D26579D17EF607DB4E81724CD" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfSignificantAcquisitionsAndDisposalsTable" xlink:label="loc_us-gaap_ScheduleOfSignificantAcquisitionsAndDisposalsTable_FA660DA1B9C431F3BB317DB4E8172BCE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsLineItems_42D32C9D26579D17EF607DB4E81724CD" xlink:to="loc_us-gaap_ScheduleOfSignificantAcquisitionsAndDisposalsTable_FA660DA1B9C431F3BB317DB4E8172BCE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SignificantAcquisitionsAndDisposalsByTransactionAxis" xlink:label="loc_us-gaap_SignificantAcquisitionsAndDisposalsByTransactionAxis_5B4DD3D1ECAA030EED457DB4E8172A51" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSignificantAcquisitionsAndDisposalsTable_FA660DA1B9C431F3BB317DB4E8172BCE" xlink:to="loc_us-gaap_SignificantAcquisitionsAndDisposalsByTransactionAxis_5B4DD3D1ECAA030EED457DB4E8172A51" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain" xlink:label="loc_us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain_0B8944619337607D215B7DB4E817BE9F_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsByTransactionAxis_5B4DD3D1ECAA030EED457DB4E8172A51" xlink:to="loc_us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain_0B8944619337607D215B7DB4E817BE9F_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain" xlink:label="loc_us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain_0B8944619337607D215B7DB4E817BE9F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsByTransactionAxis_5B4DD3D1ECAA030EED457DB4E8172A51" xlink:to="loc_us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain_0B8944619337607D215B7DB4E817BE9F" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MACFinancialHoldingCorporationandSubsidiariesMember" xlink:label="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_27A4925AC3B91D9ECF2E7DB4E817686A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsTransactionDomain_0B8944619337607D215B7DB4E817BE9F" xlink:to="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_27A4925AC3B91D9ECF2E7DB4E817686A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_494E058A2C858D3AE6877DB4E817B2FB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsLineItems_42D32C9D26579D17EF607DB4E81724CD" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_494E058A2C858D3AE6877DB4E817B2FB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_89A29160153A1222684F7DB4E817A0D6" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SignificantAcquisitionsAndDisposalsLineItems_42D32C9D26579D17EF607DB4E81724CD" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_89A29160153A1222684F7DB4E817A0D6" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/StatutoryInformation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesLineItems" xlink:label="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesTable" xlink:label="loc_us-gaap_StatutoryAccountingPracticesTable_25733F1F42E979B0B60361FC41C70ABC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_us-gaap_StatutoryAccountingPracticesTable_25733F1F42E979B0B60361FC41C70ABC" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesByJurisdictionAxis" xlink:label="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_C11468F12308B8A9890761FC41C7BF8B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_25733F1F42E979B0B60361FC41C70ABC" xlink:to="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_C11468F12308B8A9890761FC41C7BF8B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesJurisdictionDomain" xlink:label="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_C11468F12308B8A9890761FC41C7BF8B" xlink:to="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesJurisdictionDomain" xlink:label="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_C11468F12308B8A9890761FC41C7BF8B" xlink:to="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/stpr/2011/stpr-2011-01-31.xsd#stpr_WI" xlink:label="loc_stpr_WI_F66C555EB29BB60B7EA961FC41C77CC0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6" xlink:to="loc_stpr_WI_F66C555EB29BB60B7EA961FC41C77CC0" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_FannieMaeMember" xlink:label="loc_nmih_FannieMaeMember_FFCF5B3DC650CEA1FC2661FC41C7AF03" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_BEEF7E2A23C97BA9EAFC61FC41C741A6" xlink:to="loc_nmih_FannieMaeMember_FFCF5B3DC650CEA1FC2661FC41C7AF03" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_6D7EB103B3A099EA84B761FC41C77E89" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_25733F1F42E979B0B60361FC41C70ABC" xlink:to="loc_us-gaap_RangeAxis_6D7EB103B3A099EA84B761FC41C77E89" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E428429B4C729DC162C861FC41C770CA_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_6D7EB103B3A099EA84B761FC41C77E89" xlink:to="loc_us-gaap_RangeMember_E428429B4C729DC162C861FC41C770CA_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E428429B4C729DC162C861FC41C770CA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_6D7EB103B3A099EA84B761FC41C77E89" xlink:to="loc_us-gaap_RangeMember_E428429B4C729DC162C861FC41C770CA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_0F90F04515FFA4A95BA261FC41C758E8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E428429B4C729DC162C861FC41C770CA" xlink:to="loc_us-gaap_MaximumMember_0F90F04515FFA4A95BA261FC41C758E8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_3C092882AE62D10D1DED61FC41C79BEA" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_25733F1F42E979B0B60361FC41C70ABC" xlink:to="loc_dei_LegalEntityAxis_3C092882AE62D10D1DED61FC41C79BEA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_3C092882AE62D10D1DED61FC41C79BEA" xlink:to="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_3C092882AE62D10D1DED61FC41C79BEA" xlink:to="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_1BCC320252017A02602E61FC41C7053A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA" xlink:to="loc_nmih_NMicandReoneCombinedMember_1BCC320252017A02602E61FC41C7053A" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMICMember" xlink:label="loc_nmih_NMICMember_ED719518E9BF5E22A55B61FC41C77B66" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA" xlink:to="loc_nmih_NMICMember_ED719518E9BF5E22A55B61FC41C77B66" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SubsidiariesMember" xlink:label="loc_us-gaap_SubsidiariesMember_1D211CF618EE52B4394F61FC41C7B2CF" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_90941FFEC14FA9DDA74F61FC41C78ACA" xlink:to="loc_us-gaap_SubsidiariesMember_1D211CF618EE52B4394F61FC41C7B2CF" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce" xlink:label="loc_nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce_93DEEFB6BA0B7296F90F61FC41C85362" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce_93DEEFB6BA0B7296F90F61FC41C85362" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RiskToCapitalRatioRegulatoryMaximum" xlink:label="loc_nmih_RiskToCapitalRatioRegulatoryMaximum_C75E1CA47296DB3E6B4661FC41C8BEC9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_RiskToCapitalRatioRegulatoryMaximum_C75E1CA47296DB3E6B4661FC41C8BEC9" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PotentialRiskInForcetoCapitalRatio" xlink:label="loc_nmih_PotentialRiskInForcetoCapitalRatio_F3B581AA256360AB199461FC41C8DF2C" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_PotentialRiskInForcetoCapitalRatio_F3B581AA256360AB199461FC41C8DF2C" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum" xlink:label="loc_nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum_2766411C31EF76C46D766204060DDB59" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_RequiredRisktoCapitalRatioonAgreementsPerGSEApprovalMaximum_2766411C31EF76C46D766204060DDB59" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit" xlink:label="loc_nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit_937B1F1DCF61E2F10C3261FC41C808DC" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit_937B1F1DCF61E2F10C3261FC41C808DC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NumberofPoliciesinForce" xlink:label="loc_nmih_NumberofPoliciesinForce_0F2D8383CF87A4AEAEE761FC41C8C24D" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_NumberofPoliciesinForce_0F2D8383CF87A4AEAEE761FC41C8C24D" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceRiskinForce" xlink:label="loc_nmih_MortgageInsuranceRiskinForce_B7BC51DF190096F10DC561FC41C8D1D3" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_MortgageInsuranceRiskinForce_B7BC51DF190096F10DC561FC41C8D1D3" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RiskToCapitalRatioRegulatoryActual" xlink:label="loc_nmih_RiskToCapitalRatioRegulatoryActual_429DAD4211C4423D3CC261FC41C8FB14" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_RiskToCapitalRatioRegulatoryActual_429DAD4211C4423D3CC261FC41C8FB14" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_6765A68FEE16689168D261FC41C8A599" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_us-gaap_StockholdersEquity_6765A68FEE16689168D261FC41C8A599" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityMethodInvestments" xlink:label="loc_us-gaap_EquityMethodInvestments_21A35B69FE409B5E49E561FC41C89C37" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_us-gaap_EquityMethodInvestments_21A35B69FE409B5E49E561FC41C89C37" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus" xlink:label="loc_nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus_0B3B449B752B9FC0598D61FC41C855CD" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_3E0014084C0350BD5E5861FC41C8A64A" xlink:to="loc_nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus_0B3B449B752B9FC0598D61FC41C855CD" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationRiskToCapitalDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesLineItems" xlink:label="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesTable" xlink:label="loc_us-gaap_StatutoryAccountingPracticesTable_D91BEB720AE070C83E4E5CEECB88D641" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_us-gaap_StatutoryAccountingPracticesTable_D91BEB720AE070C83E4E5CEECB88D641" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_3DF53D76A0CA18776C695CEECB88CF54" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_D91BEB720AE070C83E4E5CEECB88D641" xlink:to="loc_dei_LegalEntityAxis_3DF53D76A0CA18776C695CEECB88CF54" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_3DF53D76A0CA18776C695CEECB88CF54" xlink:to="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_3DF53D76A0CA18776C695CEECB88CF54" xlink:to="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMICMember" xlink:label="loc_nmih_NMICMember_800A2EC7C4056C69142B5CEECB88EFB8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34" xlink:to="loc_nmih_NMICMember_800A2EC7C4056C69142B5CEECB88EFB8" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMIReOneMember" xlink:label="loc_nmih_NMIReOneMember_200EBBF75F02910BE1325CEECB88CE10" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34" xlink:to="loc_nmih_NMIReOneMember_200EBBF75F02910BE1325CEECB88CE10" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_8093ABCA6F010137A6615CEECB88A2DC" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_766DD3ECD68803D4624A5CEECB886A34" xlink:to="loc_nmih_NMicandReoneCombinedMember_8093ABCA6F010137A6615CEECB88A2DC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PrimaryRiskinForceAbstract" xlink:label="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PrimaryRiskinForceGross" xlink:label="loc_nmih_PrimaryRiskinForceGross_547EFD9BE4E24A5B08235CEECB88F10A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:to="loc_nmih_PrimaryRiskinForceGross_547EFD9BE4E24A5B08235CEECB88F10A" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PrimaryRiskinForceAssumed" xlink:label="loc_nmih_PrimaryRiskinForceAssumed_56F30B7567EACC01F2355CEECB88408B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:to="loc_nmih_PrimaryRiskinForceAssumed_56F30B7567EACC01F2355CEECB88408B" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_PrimaryRiskinForceCeded" xlink:label="loc_nmih_PrimaryRiskinForceCeded_A52623EE01FFD4300A4D5CEECB88DBE6" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:to="loc_nmih_PrimaryRiskinForceCeded_A52623EE01FFD4300A4D5CEECB88DBE6" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RiskinForcePrimary" xlink:label="loc_nmih_RiskinForcePrimary_BED12BF289594FF934D45CEECB8871CC" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_PrimaryRiskinForceAbstract_24E50799E8B69446E1C65CEECB884C61" xlink:to="loc_nmih_RiskinForcePrimary_BED12BF289594FF934D45CEECB8871CC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceRiskinForcePoolAbstract" xlink:label="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForceGrossPool" xlink:label="loc_nmih_MortgageInsuranceinForceGrossPool_F5EED3C6401BB129497D5CEECB887EAC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:to="loc_nmih_MortgageInsuranceinForceGrossPool_F5EED3C6401BB129497D5CEECB887EAC" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForceAssumedPool" xlink:label="loc_nmih_MortgageInsuranceinForceAssumedPool_7075D2D86E702444E8F05CEECB884ADE" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:to="loc_nmih_MortgageInsuranceinForceAssumedPool_7075D2D86E702444E8F05CEECB884ADE" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceinForceCededPool" xlink:label="loc_nmih_MortgageInsuranceinForceCededPool_F57AA727F106315257725CEECB88BD5C" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:to="loc_nmih_MortgageInsuranceinForceCededPool_F57AA727F106315257725CEECB88BD5C" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceRiskInForcePool" xlink:label="loc_nmih_MortgageInsuranceRiskInForcePool_BE10F968C3D6302034C65CEECB896114" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_MortgageInsuranceRiskinForcePoolAbstract_9CD64D018A4A8F693B0C5CEECB88C6E5" xlink:to="loc_nmih_MortgageInsuranceRiskInForcePool_BE10F968C3D6302034C65CEECB896114" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MortgageInsuranceRiskinForce" xlink:label="loc_nmih_MortgageInsuranceRiskinForce_59F056BDF4D02AE17D7F5CEECB893B5D" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_MortgageInsuranceRiskinForce_59F056BDF4D02AE17D7F5CEECB893B5D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_F0A5006376EB89E587195CEECB89864D" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_F0A5006376EB89E587195CEECB89864D" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_ContingencyReserve" xlink:label="loc_nmih_ContingencyReserve_E60AD773865EB178F5695CEECB892DA7" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_ContingencyReserve_E60AD773865EB178F5695CEECB892DA7" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves" xlink:label="loc_nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves_8E1EB9338C4F2A40D04F5CEECB894444" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves_8E1EB9338C4F2A40D04F5CEECB894444" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_RiskToCapitalRatioRegulatoryActual" xlink:label="loc_nmih_RiskToCapitalRatioRegulatoryActual_4499F1B1EE963BE57E655CEECB89842C" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_014116DE2EAAC445AF1A5CEECB88736C" xlink:to="loc_nmih_RiskToCapitalRatioRegulatoryActual_4499F1B1EE963BE57E655CEECB89842C" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationStatutoryIncomeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesLineItems" xlink:label="loc_us-gaap_StatutoryAccountingPracticesLineItems_FBD994C7ACF726E647A47DB4E7BCFC30" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesTable" xlink:label="loc_us-gaap_StatutoryAccountingPracticesTable_AEAE09EC5F6BA4810EEB7DB4E7BBD7D8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_FBD994C7ACF726E647A47DB4E7BCFC30" xlink:to="loc_us-gaap_StatutoryAccountingPracticesTable_AEAE09EC5F6BA4810EEB7DB4E7BBD7D8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_F39BA01C271735178D907DB4E7BB83C5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_AEAE09EC5F6BA4810EEB7DB4E7BBD7D8" xlink:to="loc_dei_LegalEntityAxis_F39BA01C271735178D907DB4E7BB83C5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_513497C74AAFD55C257B7DB4E7BCFE18_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_F39BA01C271735178D907DB4E7BB83C5" xlink:to="loc_dei_EntityDomain_513497C74AAFD55C257B7DB4E7BCFE18_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_513497C74AAFD55C257B7DB4E7BCFE18" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_F39BA01C271735178D907DB4E7BB83C5" xlink:to="loc_dei_EntityDomain_513497C74AAFD55C257B7DB4E7BCFE18" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_4F1B41F151D101DF4CFC7DB4E7BC405A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_513497C74AAFD55C257B7DB4E7BCFE18" xlink:to="loc_nmih_NMicandReoneCombinedMember_4F1B41F151D101DF4CFC7DB4E7BC405A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount_0EDFE5576AA1CF5ACC047DB4E7BCCF0C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_FBD994C7ACF726E647A47DB4E7BCFC30" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount_0EDFE5576AA1CF5ACC047DB4E7BCCF0C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_1434A6BBB72E3DCE6FE47DB4E7BC7975" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_FBD994C7ACF726E647A47DB4E7BCFC30" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_1434A6BBB72E3DCE6FE47DB4E7BC7975" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_StatutoryAccountingPracticesContingencyReserve" xlink:label="loc_nmih_StatutoryAccountingPracticesContingencyReserve_CE8630487C17F5484BB37DB4E7BC2FF3" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_FBD994C7ACF726E647A47DB4E7BCFC30" xlink:to="loc_nmih_StatutoryAccountingPracticesContingencyReserve_CE8630487C17F5484BB37DB4E7BC2FF3" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/Warrants" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/WarrantsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_EC1B40EF92CED3ED48B485EDBE6254EB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_EC1B40EF92CED3ED48B485EDBE6254EB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_34FC4B9C59570113F55285EDBE62C5C9" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_EC1B40EF92CED3ED48B485EDBE6254EB" xlink:to="loc_us-gaap_StatementClassOfStockAxis_34FC4B9C59570113F55285EDBE62C5C9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_016685A9E08015CBA17285EDBE626544_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_34FC4B9C59570113F55285EDBE62C5C9" xlink:to="loc_us-gaap_ClassOfStockDomain_016685A9E08015CBA17285EDBE626544_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_016685A9E08015CBA17285EDBE626544" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_34FC4B9C59570113F55285EDBE62C5C9" xlink:to="loc_us-gaap_ClassOfStockDomain_016685A9E08015CBA17285EDBE626544" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_A174CD79457A36B34C9185EDBE626884" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_016685A9E08015CBA17285EDBE626544" xlink:to="loc_us-gaap_CommonClassAMember_A174CD79457A36B34C9185EDBE626884" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_43B0716190D2E6F9E90E85EDBE629DEA" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_EC1B40EF92CED3ED48B485EDBE6254EB" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_43B0716190D2E6F9E90E85EDBE629DEA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_08BA31DFB92C47E5165585EDBE62C0DB_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_43B0716190D2E6F9E90E85EDBE629DEA" xlink:to="loc_us-gaap_EquityComponentDomain_08BA31DFB92C47E5165585EDBE62C0DB_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_08BA31DFB92C47E5165585EDBE62C0DB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_43B0716190D2E6F9E90E85EDBE629DEA" xlink:to="loc_us-gaap_EquityComponentDomain_08BA31DFB92C47E5165585EDBE62C0DB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_CA6FFBBA6F748B55261885EDBE62A91A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_08BA31DFB92C47E5165585EDBE62C0DB" xlink:to="loc_us-gaap_CommonStockMember_CA6FFBBA6F748B55261885EDBE62A91A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_FE37E72AA19B7A8BF3C985EDBE6253E2" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_EC1B40EF92CED3ED48B485EDBE6254EB" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_FE37E72AA19B7A8BF3C985EDBE6253E2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_48977A23E5C557796F7885EDBE623270_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FE37E72AA19B7A8BF3C985EDBE6253E2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_48977A23E5C557796F7885EDBE623270_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_48977A23E5C557796F7885EDBE623270" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FE37E72AA19B7A8BF3C985EDBE6253E2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_48977A23E5C557796F7885EDBE623270" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_MACFinancialHoldingCorporationandSubsidiariesMember" xlink:label="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_4EE70E2E043AF69071DF85EDBE628722" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_48977A23E5C557796F7885EDBE623270" xlink:to="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_4EE70E2E043AF69071DF85EDBE628722" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights" xlink:label="loc_us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights_58AC15A6BF21FD5E08F885EDBE627A16" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights_58AC15A6BF21FD5E08F885EDBE627A16" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1" xlink:label="loc_us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1_3DFE6B9F87AD79D140DD85EDBE6227C7" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1_3DFE6B9F87AD79D140DD85EDBE6227C7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_1F217D2AC9AC38FF443D85EDBE62A16F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_1F217D2AC9AC38FF443D85EDBE62A16F" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod" xlink:label="loc_nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod_1EA49EB7ECD1B435028F85EDBE62B155" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod_1EA49EB7ECD1B435028F85EDBE62B155" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_FA8C7C38641A0924264085EDBE63C9B5" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_FA8C7C38641A0924264085EDBE63C9B5" xlink:type="arc" />
    <loc xlink:href="nmih-20140930.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_A116BFF5C6C34DCA105785EDBE63862B" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_9B9145FECEE6D452442A85EDBE62B49A" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_A116BFF5C6C34DCA105785EDBE63862B" xlink:type="arc" />
  </definitionLink>
</linkbase>
